Commit Graph

116 Commits

Author SHA1 Message Date
J. Nick Koston
c1b9400833 Provide a better model for HomeKit service entries (#100848) 2023-09-25 09:34:53 -05:00
Erik Montnemery
07b19b3dd9 Adjust homekit tests which create devices (#98193) 2023-08-10 18:23:17 +02:00
Erik Montnemery
7539cf25be Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
J. Nick Koston
e3e1bef376 Fix manual specification of multiple advertise_ip with HomeKit (#95548)
fixes #95508
2023-06-29 11:35:32 -04:00
J. Nick Koston
ef2e55ecec Add dual IP stack support to HomeKit (#94126)
* Add dual IP stack support to HomeKit

* fix tests

* Update homeassistant/components/network/__init__.py

* remove scopes

* Bump HAP-python to 4.7.0

fixes pairing with newer iOS

changelog: https://github.com/ikalchev/HAP-python/compare/v4.6.0...4.7.0

* fixes

* update tests

* Relocate get_announced_addresses from zeroconf to network

needed for #94126

* rename

* rename

* Update homeassistant/components/network/__init__.py

* Update homeassistant/components/network/__init__.py

* rename

* fix import

* coverage
2023-06-24 23:18:38 -04:00
J. Nick Koston
b857dc8d94 Bump HAP-python to 4.7.0 (#94812) 2023-06-20 23:06:26 +02:00
J. Nick Koston
a0c023d5cb Reduce overhead to lookup items in the entity and device registry (#94568) 2023-06-14 20:47:18 +02:00
Erik Montnemery
e3c16e634b Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
J. Nick Koston
b875706bdd Default homekit to listening on all interfaces to match Home Assistant behavior (#91520) 2023-04-17 09:41:57 +02:00
J. Nick Koston
d442f2aedb Add names to homekit tasks to better track startup problems (#90802)
* Add names to homekit tasks to better track startup problems

* fix test
2023-04-08 23:13:47 -04:00
epenet
ee78864b05 Adjust entity registry access in homekit tests (#88959) 2023-03-01 16:54:00 +01:00
epenet
03710e58b5 Add type hints to integration tests (part 9) (#87983) 2023-02-13 12:06:51 +01:00
Erik Montnemery
cc564026fa Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
epenet
37a2040d7b Add type hints to integration tests (h-i) (#87703) 2023-02-08 18:12:56 +01:00
J. Nick Koston
53c1c2eb56 Fix homekit bridge iid allocations (#81613)
fixes undefined
2022-11-08 11:15:16 +01:00
J. Nick Koston
3b33e0d832 Add support for restoring HomeKit IIDs (#79913) 2022-10-14 09:58:09 -10:00
J. Nick Koston
ec8901b9af Improve robustness of linking homekit yaml to config entries (#79386) 2022-10-01 16:44:45 +02:00
Franck Nijhof
bfb47eb212 Final clean up of helpers accessed via hass (#72032)
* Final clean up of helpers accessed via hass

* Fix circular dep

* Fix import
2022-05-17 23:42:37 +03:00
J. Nick Koston
034ba7d3ff Only read HomeKit service/chars from disk once (#70354) 2022-04-21 13:54:44 -07:00
Erik Montnemery
1c57e65cea Exclude hidden entities from homekit (#68552) 2022-03-23 10:32:51 +01:00
J. Nick Koston
d53124910f Add entity category support to HomeKit (#64492) 2022-01-19 21:48:50 -10:00
J. Nick Koston
945477a482 Fix KeyError during call to homekit.unpair (#63627) 2022-01-07 19:47:14 +01:00
J. Nick Koston
5c8271552a Add hardware revision support to homekit (#63336) 2022-01-04 16:19:12 +01:00
Erik Montnemery
cb2c2d98c3 Remove unnecessary checks before calling os.makedirs (#62576) 2021-12-23 09:59:31 +01:00
Dave T
168fefad88 Use DeviceClass Enums in homekit (#62218) 2021-12-20 12:53:44 -06:00
J. Nick Koston
400aaeaa91 Ensure homekit setup messages run in event loop (#60226) 2021-11-23 11:40:20 -06:00
Erik Montnemery
49a27e12ad Add support to entity registry for overriding device_class (#59985) 2021-11-22 08:38:06 -08:00
J. Nick Koston
347c4ea137 Bump zeroconf to 0.37.0 (#59932) 2021-11-18 20:23:20 -08:00
Paulus Schoutsen
31153ac155 Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
J. Nick Koston
438ca73aba Complete removal of auto_start, zeroconf_default_interface, and safe_mode from HomeKit (#58320) 2021-10-24 11:46:35 +02:00
Paulus Schoutsen
a4d9019ffc Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
J. Nick Koston
0fc89780e9 Fix listener leak in HomeKit on reload (#56143)
* Fix listener leak in HomeKit on reload

* Fix mocking
2021-09-12 15:06:03 -07:00
J. Nick Koston
eff59e8b00 Use the same server name for all HomeKit bridges (#55860) 2021-09-11 19:00:26 -07:00
J. Nick Koston
195ee2a188 Avoid creating sockets in homekit port available tests (#55668)
* Avoid creating sockets in homekit port available tests

* prevent new bridge from being setup -- its too fast now that the executor job is gone and it revealed an unpatched setup
2021-09-03 17:15:28 -10:00
Erik Montnemery
7dbe8070f7 Mock out network.util.async_get_source_ip in tests (#55592) 2021-09-02 20:44:50 +02:00
J. Nick Koston
bd0af57ef2 Support device triggers in HomeKit (#53869) 2021-08-25 16:47:39 +02:00
J. Nick Koston
99465f53c7 Bump HAP-python to 4.1.0 (#55005) 2021-08-23 21:00:26 +02:00
J. Nick Koston
0f15d2bf19 Ensure HomeKit accessories are started again after reset (#53372) 2021-07-24 16:31:30 +02:00
J. Nick Koston
009f34bfed Add a homekit.unpair service to forcefully remove pairings (#53303)
- Sometimes homekit will go unresponsive because a pairing for a specific
  device is missing. To avoid deleting the config entry and recreating
  it, which can be a painful process if there are many bridged entities,
  the homekit.unpair service allows forceful removal of the pairings so
  the accessory can be paired again.
2021-07-22 12:44:36 +02:00
J. Nick Koston
2a65c5f93c Recreate HomeKit accessories when calling the reset_accessory service (#53199) 2021-07-20 21:45:21 -07:00
J. Nick Koston
6c05e2746d Improve error message when HomeKit does not support an entity (#53129) 2021-07-18 09:27:25 -10:00
J. Nick Koston
30d465e9dd Update homekit to use network integration (#52946) 2021-07-14 11:44:58 +02:00
J. Nick Koston
75d6ffebc8 Improve error when HomeKit accessory underlying entity is missing (#51713)
* Improve error when HomeKit accessory underlying entity is missing

* docstring in test
2021-06-13 17:27:04 -05:00
J. Nick Koston
0e7c2cddf7 Upgrade HAP-python to 3.5.0 (#51261)
* Upgrade HAP-python to 3.4.2

- Fixes for malformed event sending

- Performance improvements

* Bump

* update tests to point to async
2021-05-31 20:47:12 +02:00
Marc Mueller
54d1e9985f Update typing 15 (#48079) 2021-03-18 15:13:22 +01:00
J. Nick Koston
15aa00d6cc Fix homekit checking for port cleanup too many times (#47836)
* Fix homekit checking for port cleanup too many times

The loop should have terminated as soon as the port was available

* coverage

* tweak homekit shutdown wait
2021-03-15 05:14:46 +01:00
J. Nick Koston
f4b775b125 Cleanup homekit and remove aid storage from hass.data (#47488) 2021-03-11 22:05:03 -08:00
J. Nick Koston
2e89f152ba Bump HAP-python to 3.4.0 (#47476)
* Bump HAP-python to 3.3.3

* bump

* fix mocking
2021-03-07 01:30:57 +01:00
J. Nick Koston
853da40e70 Increment the homekit config version when restarting (#47209)
If an entity changes between restart the iOS/controller
device may have cached the old chars for the accessory.
To force the iOS/controller to reload the chars, we
increment the config version when Home Assistant restarts
2021-02-28 20:42:09 -08:00
J. Nick Koston
87cbbcb014 Automatically create HomeKit accessory mode entries (#46473)
When we set up HomeKit, we asked users if they wanted
to create an entry in bridge or accessory mode.

This approach required the user to understand how HomeKit works and
choose which type to create.

When the user includes the media player or camera domains,
we exclude them from the bridge and create the additional entries
for each entity in accessory mode.
2021-02-23 16:22:23 -08:00