1
0
mirror of https://github.com/home-assistant/core.git synced 2025-09-02 09:01:05 +00:00
Commit Graph

48 Commits

Author SHA1 Message Date
J. Nick Koston
f23b1750e8 Migrate HomeKit Controller to use stable identifiers () 2022-10-11 11:26:03 -10:00
J. Nick Koston
92612c9fe3 Add RSSI sensor to HomeKit Controller () 2022-09-25 21:31:56 -04:00
Jc2k
eb0828efdb Dont rely on config flow to monitor homekit_controller c# changes () 2022-08-20 10:58:59 -10:00
J. Nick Koston
b9c8d65940 Restore accessory state into pairing using new HKC methods () 2022-07-16 12:49:15 -05:00
J. Nick Koston
a31dde9cb4 Await startup in homekit controller () 2022-07-14 07:44:27 -05:00
Jc2k
59170d3c54 Prepare homekit_controller for _hap._udp.local. ()
* Prepare homekit_controller for _hap._udp.local.
2022-07-10 19:50:54 +01:00
J. Nick Koston
e0614953a2 Add support for async_remove_config_entry_device to homekit_controller () 2022-05-28 09:47:14 -10:00
Joshua Roys
9134e5c844 Get discovered zeroconf IPv6 addresses () 2022-02-11 16:46:17 -06:00
Jc2k
0daf20c0cc Prepare for new aiohomekit lifecycle API () 2022-02-11 19:26:35 +00:00
Jc2k
0f88790303 Refactor homekit_controller to prepare for more typing information () 2022-01-31 16:48:16 -06:00
Jc2k
58b8c30221 Improve homekit_controller tests () 2022-01-30 16:59:39 -06:00
Jc2k
eb94fe1ca7 Use upstream constants when defining homekit service to platform mapping () 2022-01-30 16:59:01 -06:00
Jc2k
4a0a4624ff Allow homekit_controller to handle device registry entries for devices with poor serial numbers () 2022-01-23 13:00:05 -10:00
Jc2k
061ee1b875 Add HUB_TEST_ACCESSORY_ID const for homekit_controller tests () 2022-01-23 11:51:55 -10:00
Jc2k
f0fdd7d650 Finish deduplicating homekit_controller enumeration tests () 2022-01-17 10:44:59 -10:00
Jc2k
99481e2258 Refactor homekit_controller tests to reduce duplication. () 2022-01-16 18:43:44 +00:00
epenet
0d24862a28 Use dataclass properties in homekit_controller discovery ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-30 16:06:18 +01:00
Franck Nijhof
c68b259bd3 Cleanup of unused connection_class logic ()
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-04-29 23:12:58 +02:00
Jc2k
2879081772 Implement source switching for homekit_controller televisions () 2020-03-06 15:47:40 +00:00
springstan
157f972d72 Use f-strings in integrations starting with "H" - "L" ()
* Use f-strings in integrations starting with "H"

* Use f-strings in integrations starting with "I"

* Use f-strings in integrations starting with "J"

* Use f-strings in integrations starting with "K"

* Use f-strings in integrations starting with "L"

* Fix lint error

* Use join instead of f-string in homekit_controller

* Use local variables with f-strings

* Fix lint error

* Escape the characters in f-string

* Sort imports with isort in homeworks light

* Fix pylint error

* Fix broken tests

* Fix broken tests v2
2020-02-28 12:39:29 +01:00
Jc2k
d207c37c33 Address homekit_controller feedback on and () 2020-02-26 17:10:05 -08:00
Jc2k
853d6cda25 Make homekit_controller a local push integration () 2020-02-26 10:35:53 -08:00
Jc2k
92a47f14bb homekit_controller test cleanups () 2020-02-26 09:44:04 -08:00
Jc2k
1ddc1ebc6b Refactor away deprecated homekit_controller test helpers () 2020-02-25 21:19:04 +01:00
Jc2k
df9363610c Refactor homekit_controller to be fully asynchronous ()
* Port homekit_controller to aiohomekit

* Remove succeed() test helper

* Remove fail() test helper
2020-02-24 10:55:33 +01:00
Ville Skyttä
5216477353 Be consistent with Home Assistant and Hass.io spelling ()
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Bas Nijholt
d2c1e5d45c Sort imports according to PEP8 for homekit_controller () 2019-12-08 18:14:26 +01:00
springstan
3b5da9c44a Move imports to top for homekit_controller ()
* Move imports to top for homekit_controller

* Fix IpPairing mock in two test files
2019-12-08 16:50:57 +00:00
Jc2k
34cde21876 Fix for HomeKit controller state not updating after put () 2019-08-13 10:09:55 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Jc2k
8c69fd91ff Only poll HomeKit connection once for all entities on a single bridge/pairing ()
* Stub for polling from a central location

* Allow connection to know the entity objects attached to it

* Move polling logic to connection

* Don't poll if no characteristics selected

* Loosen coupling between entity and HKDevice

* Disable track_time_interval when removing entry

* Revert self.entities changes

* Use @callback for async_state_changed

* Split out unload and remove and add a test

* Test that entity is gone and fix docstring
2019-07-22 09:22:44 -07:00
Robert Svensson
42ee8eef50 Move Homekit controller component to user zeroconf discovery () 2019-05-29 11:20:04 -07:00
Jc2k
b8cbd39985 HomeKit Controller: Adopt config entries for pairing with homekit accessories ()
* Fix user initiated pairing + show more user friendly name

* Add lock around async_refresh_entity_map

* Migrate homekit_controller to config entries.

* Improve docstring

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Add dummy async_setup_platform

* add_service -> async_add_service

* Add missing returns

* Enable coverage checks for homekit_controller
2019-05-12 23:56:05 -07:00
Jc2k
0fe21f2015 Support STATE_AUTO in homekit_controller climate () 2019-05-01 22:44:54 -05:00
Jc2k
1c4367e5a9 Fix min/max temp and humidity for homekit_controller climate ()
* Fix min/max temp and humidity for homekit_controller climate.

* Fix typo
2019-05-01 00:08:30 +02:00
Jc2k
b3a8b0056b Add and use an async_fire_service_discovered helper () 2019-04-19 08:38:50 -04:00
Jc2k
4ac9a2e9de Add storage for cacheable homekit entity maps. () 2019-04-18 08:55:34 -07:00
Jc2k
f7afd9d6bc Fix handling of homekit_controler zeroconf c# changes () 2019-04-17 10:02:51 -07:00
Jc2k
906f0113ad Add more HomeKit device enumeration tests ()
* Test that Aqara Gateway, Ecobee 3 and Lennox E30 is correctly enumerated

* Move json to fixtures directory

* Move IO to executor
2019-03-30 11:21:11 +01:00
Jc2k
8bf5e57b7f Move HKDevice into connection () 2019-03-27 20:01:10 -07:00
Jc2k
c2aa06d0d4 Add some tests for Koogeek LS1 () 2019-03-19 00:58:56 -07:00
Jc2k
c0b859d8da Set homekit controller entity as unavailable if new connections fail ()
* Set entity as unavailable if new connections fail

* Fix docstring
2019-03-12 18:45:34 -07:00
Jc2k
dbf129dfdd Start preparing for homekit_controller config entries ()
* Start preparing for homekit_controller config entries

* Review feedback

* Review feedback

* Only use the vol.strip validator for pairing_code

* CV not required now

* Changes from review

* Changes after review
2019-03-06 19:44:52 -08:00
cpopp
84b84559a4 Add support for homekit controller sensors ()
Adds support for homekit devices with temperature, humidity, and
light level characteristics (such as the iHome iSS50)
2019-02-28 10:09:04 -08:00
koreth
3e9376c418 Handle capitalized HomeKit property names ()
The Velux ACTIVE gateway uses `C#` rather than `c#` as the name of
the property that holds the count of accessories. Apple's HomeKit docs
suggest that properties should be case-insensitive, so update the
code to not assume the property names are lower case.
2019-02-24 13:56:52 +01:00
Jc2k
41c1997b88 Homekit controller BLE groundwork ()
* Define the characteristics to poll (or subscribe to) up front

* Configure characteristics immediately instead of during first poll

* Do as much cover configuration upfront as possible

* Remove test workaround as no longer needed

* Remove switch code that is already handled by HomeKitEntity

* Remove lock code already handled by HomeKitEntity

* Remove light code already handled by HomeKitEntity

* Remove alarm code already handled by HomeKitEntity

* Remove climate code already handled by HomeKitEntity
2019-01-28 17:21:20 +01:00
Jc2k
995758b8ac Add more HomeKit controller tests ()
* homekit_controller tests: automatically find entity ids in tests

Some entities use dynamic ids because of the nature of the test fakes it is
hard to predict the name of the entity that will be created. This inspects the
EntityComponent of the domain to find the freshly created entity.

* homekit_controller: Tests can now define their own Service models.

All existing tests use models as defined upstream. But upstream only defines a
few service models. This adds a generic model helper for creating test
service/characteristic models.

* homekit_controller: Add cover tests

* homekit_controller: Add lock tests

* homekit_controller: Add alarm_control_panel tests

* homekit_controller: Update light tests for color_temp.

* Revert "homekit_controller tests: automatically find entity ids in tests"

This reverts commit 506caa4c3e.

* homekit_controller: Mock entity name so entity_id is consistent.

Also remove spurious subclass overrides that are identical to parent class.

* homekit_controler: Make tests less awkward as allowed top level imports
2019-01-28 13:20:32 +01:00
Jc2k
10e3698fd7 Add homekit_controller tests ()
* Add a test for a homekit_controller switch

* Add a test for a homekit_controller lightbulb

* Add a test for homekit_controller thermostat

* Changes from review

* Patch utcnow to known time in HK tests

* Neater fixture use per review
2019-01-27 12:34:49 +01:00