Commit Graph

39 Commits

Author SHA1 Message Date
J. Nick Koston
3b33e0d832 Add support for restoring HomeKit IIDs (#79913) 2022-10-14 09:58:09 -10:00
Franck Nijhof
7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
J. Nick Koston
60bfcc6be4 Allow hidden entities to be selected in homekit include mode (#71250) 2022-05-03 09:47:13 -07:00
J. Nick Koston
47c3aef7a2 Fix registered entities without a category not being exclude-able in the HomeKit UI (#69543) 2022-04-07 13:46:41 +02:00
J. Nick Koston
220beefb89 Prevent HomeKit from offering hidden entities (#69042) 2022-04-01 13:34:44 +02: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
36e2617796 Ensure homekit options flow remembers excluded entities during edit (#64401) 2022-01-18 19:17:43 -10:00
J. Nick Koston
1019156899 Fix homekit options being mutated during config_flow/migration (#64003) 2022-01-12 14:56:24 -08:00
J. Nick Koston
9dd09f66e2 Ensure selected entity is pre-selected in homekit options flow (#63628)
* Ensure selected entity is pre-selected in homekit options flow

- We recently adjusted the flow to exclude entities that had
  been deleted from breaking the UI validation. We need to include
  single entities in the set of all supported entities since
  accessory mode has no domain filter

* tweak

* Additional fixes

* small tweak to speed up building the set

* merged fixed version for test branch
2022-01-07 17:46:39 -08:00
J. Nick Koston
6524cd4eb2 Fix user input malformed with deleted entities in HomeKit exclude flow (#60061) 2021-11-23 11:46:54 -06:00
J. Nick Koston
347c4ea137 Bump zeroconf to 0.37.0 (#59932) 2021-11-18 20:23:20 -08:00
J. Nick Koston
0fb21af07f Strip out deleted entities when configuring homekit (#59844) 2021-11-18 15:21:51 -08: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
Erik Montnemery
45046941c6 Avoid creating sockets in homekit port available tests (#56342) 2021-09-17 04:16:57 -10:00
Greg Thornton
371aa03bca Add audio support option to HomeKit camera UI config flow (#56107) 2021-09-11 16:41:30 -10: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
e78a62c802 Fix homekit locks not being created from when setup from the UI (#53301) 2021-07-21 22:22:06 -07:00
J. Nick Koston
5365fb6c72 Fix setting up remotes that lack a supported features list in homekit (#49152) 2021-04-13 12:44:07 +02:00
J. Nick Koston
6b93c4073d Ensure homekit yaml config works when there is an ignored config entry (#48175) 2021-03-21 21:17:04 -10: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
J. Nick Koston
374aa3aee1 Fix homekit options not being prefilled (#45926)
* Fix homekit options not being prefilled

When changing homekit options, the existing ones
were not being prefilled on the form.

* hide camera screen if no cameras
2021-02-05 02:39:07 +01:00
J. Nick Koston
463a32819c Ensure homekit never picks a port that another config entry uses (#45433) 2021-02-02 14:30:38 +01:00
J. Nick Koston
5f9a1d105c Improve HomeKit Accessory Mode UX (#45402) 2021-01-29 09:57:13 -06:00
J. Nick Koston
af21893652 Remove safe mode from HomeKit (#45028)
Safe mode was added to work around a race condition where
the mdns announcment was sent too early and would cause
pairing to fail. Since this has been corrected in
HAP-python, there is no longer a need to have
safe mode.
2021-01-11 14:26:09 +01:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
J. Nick Koston
4905be0c40 Move HomeKit autostart to advanced options flow (#44599) 2020-12-29 13:54:24 +01:00
Paulus Schoutsen
1c36bf5e19 Fix block till done in create entry config flow tests (#42290) 2020-10-24 16:20:56 +02:00
J. Nick Koston
3ffa050905 Support HomeKit accessory mode (#41679)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-15 11:59:50 -05:00
J. Nick Koston
c5ae801bcb Allow HomeKit to be configured in include mode from the UI (#41662) 2020-10-15 15:33:01 +02:00
Franck Nijhof
1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus Schoutsen
0c771f1c42 Replace asynctest with tests.async_mock (#37428) 2020-07-03 11:29:35 -07:00
Shulyaka
4ec71c58bd Add humidifier support to homekit (#37207)
* Add humidifier support to homekit

* spell

* dependencies

* lint

* add linked humidity sensor for humidifiers

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* apply suggestions from code review

* pylint

* Fix tests

* Update homeassistant/components/homekit/type_humidifiers.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update tests/components/homekit/test_homekit.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* apply suggestions from code review

* lint

* pylint

* push

* test for unavailable linker sensor

* black

* valid values key case

* black

* Update homeassistant/components/homekit/type_humidifiers.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* black

* coverage

* Set current humidity to 0 if linked sensor removed or unavailable

* use last known humidity instead

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-02 12:53:11 -05:00
J. Nick Koston
5f4fdaa171 Remove zeroconf options from homekit (#35687)
* Remove zeroconf options from homekit

homekit uses the system shared zeroconf instance which
made the interface choice option controlled by the
zeroconf integration setting.

* change to cv.deprecated

* adj

* fix remaining tests from original merge conflict

* remove invalidation_version
2020-06-02 17:47:39 -05:00
stickpin
a38bb5b33b Add Homekit cameras codecs (#35238)
* Homekit cameras - Add codecs support

* Add valid_codecs + move audio application parameter

* Increase video bufsize

* Increase audio bufsize

* Update config flow to be aware of the copy option

* Add tests for copy video and audio codec

* remove unused from test

* remove unused from test

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-07 09:55:09 -05:00
J. Nick Koston
793592b2b8 Config flow for homekit (#34560)
* Config flow for homekit

Allows multiple homekit bridges to run

HAP-python state is now stored at .storage/homekit.{entry_id}.state
aids is now stored at .storage/homekit.{entry_id}.aids

Overcomes 150 device limit by supporting
multiple bridges.

Name and port are now automatically allocated
to avoid conflicts which was one of the main
reasons pairing failed.

YAML configuration remains available in order to offer entity
specific configuration.

Entries created by config flow can add and remove
included domains and entities without having to restart

* Fix services as there are multiple now

* migrate in executor

* drop title from strings

* Update homeassistant/components/homekit/strings.json

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Make auto_start advanced mode only, add coverage

* put back title

* more references

* delete port since manual config is no longer needed

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-30 23:05:06 -05:00