1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00
Commit Graph

90 Commits

Author SHA1 Message Date
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
J. Nick Koston
20d93b4b29 Remove support for migrating pre-config entry homekit (#46616)
HomeKit pairings and accessory ids from versions 0.109 and earlier are no longer
migrated on upgrade. Users upgrading directly to 2021.3 from 0.109
and older should upgrade to 2021.2 first if they wish to preserve
HomeKit configuration and avoid re-pairing the bridge.

This change does not affect upgrades from 0.110 and later.
2021-02-16 08:37:43 +01:00
J. Nick Koston
bc8a52038b Fix homekit migration not being awaited (#46460) 2021-02-12 08:45:19 -10: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
385b7e17ef Move homekit accessory creation to async (#45788) 2021-01-31 11:36:19 -10:00
J. Nick Koston
dac9626112 Resolve homekit cover adjustment slowness (#45730) 2021-01-31 21:39:35 +01: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
J. Nick Koston
f5b389faa8 Warn users when their HomeKit configuration may be unstable (#44999) 2021-01-10 09:38:41 -10:00
Ville Skyttä
2fb3be50ab Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None

* Remove unnecessary async_get_device connections arg usages

Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Lindsay Ward
181811b7b8 Fix typo exceeded, change to exceed, in HomeKit (#42705) 2020-11-01 03:51:56 -10: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
7b016063ca Refactor zeroconf setup to be async (#39955)
* Refactor zeroconf setup to be async

Most of the setup was calling back to async because
we were setting up listeners.  Since we only need
to jump into the executor to create the zeroconf
instance, its much faster to setup in async.

In testing this cut the setup time in half
or better.

* partial revert to after_deps
2020-09-13 18:06:19 -05:00
J. Nick Koston
bf1ad0a757 Prevent missing integration from failing HomeKit startup (#39918) 2020-09-10 23:19:11 +02:00
springstan
d2b1918e9c Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
J. Nick Koston
414a59ae9f Add the ability to reload homekit from yaml (#39326) 2020-08-28 16:46:45 +02:00
Franck Nijhof
1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick Koston
3871688dfb Fix homekit test mocking missed in loop changeover (#37628) 2020-07-07 15:14:58 -07:00
Paulus Schoutsen
f49ce5d1b4 Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-06 15:58:53 -07:00
J. Nick Koston
debb928b30 Use the main event loop for homekit (#37441)
* use hass.loop for homekit

* update calls for upstream pr

* Bump HAP-python to 2.9.2
2020-07-05 12:27:07 -05: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
0f72008090 Ensure homekit state changed listeners are unsubscribed on reload (#37200)
* Ensure homekit state changed listeners are unsubscribed on reload

* fix mocking
2020-06-29 11:25:26 -05:00
mdegat01
6c7355785a Add support for glob matching to entity filters (#36913)
* Added GLOB capability to entityfilter and every place that uses it. All existing tests are passing

* added tests for components affected by glob change

* fixed flake8 error

* mocking the correct listener

* mocking correct bus method in azure test

* tests passing in 3.7 and 3.8

* fixed formatting issue from rebase/conflict

* Checking against glob patterns in more performant way

* perf improvments and reverted unnecessarily adjusted tests

* added new benchmark test around filters

* no longer using get with default in entityfilter

* changed filter name and removed logbook from filter benchmark

* simplified benchmark tests from feedback

* fixed apache tests and returned include exclude schemas to normal

* fixed azure event hub tests to properly go through component logic

* fixed azure test and clean up for other tests

* renaming test files to match standard

* merged mqtt statestream test changes with base

* removed dependency on recorder filter schema from history

* fixed recorder tests after merge and a bunch of lint errors
2020-06-23 20:02:29 -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
J. Nick Koston
879e2d1afd Improve stability of homekit accessory ids (#35691) 2020-05-26 22:15:00 -07:00
J. Nick Koston
8cbee76929 Add support for homekit camera motion notification (#35994)
* Add support for homekit camera motion notification

A motion sensor can now be linked to the cameras.

* Increase coverage
2020-05-25 18:05:38 -05:00