hass-core/tests
J. Nick Koston d6a47cb3e0
Set homekit alarm/sensor/switch/cover state as soon as possible (#34245)
* Set homekit alarm/sensor/switch state as soon as possible

This change is part of a multi-part effort to fix the
HomeKit event storms on startup.

Previously we would set the states after HomeKit
had started up which meant that when the controller
client connected it would request the states and get
a list of default states so all the initial states
would always be wrong. The defaults states generally went
unnoticed because we set the state of each HomeKit device
soon after which would result in an event storm in the log
that looked like the following for every client and every
device:

Sending event to client: ('192.168.x.x', 58410)
Sending event to client: ('192.168.x.x', 53399)
Sending event to client: ('192.168.x.x', 53399)

To solve this, we now set the state right away when we
create the entity in HomeKit, so it is correct on
initial sync, which avoids the event storm.  Additionally,
we now check all states values before sending an update
to HomeKit to ensure we do not send events when nothing
has changed.

* pylint

* Fix event storm in covers as well

* fix refactoring error in security system

* cover positions, now with constants
2020-04-15 21:38:31 -05:00
..
auth Add ability to specify group when creating user (#33373) 2020-03-30 20:33:43 +02:00
components Set homekit alarm/sensor/switch/cover state as soon as possible (#34245) 2020-04-15 21:38:31 -05:00
fixtures Add tests for additional nut ups models (#34240) 2020-04-15 20:28:03 -05:00
hassfest
helpers Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00
mock
resources
scripts
test_util Fix docstring in test_utils/aiohttp.py (#34040) 2020-04-11 20:20:19 +02:00
testing_config Add and use percentage constant (#32094) 2020-02-28 11:46:48 -08:00
util Patch http.client to not do I/O in the event loop (#34194) 2020-04-15 15:32:10 -07:00
__init__.py
bandit.yaml
common.py Don't write storage to disk while stopping (#33456) 2020-04-02 10:25:28 -07:00
conftest.py Allow WS queue to temporarily peak (#34175) 2020-04-13 18:50:36 -07:00
ignore_uncaught_exceptions.py Removed uncaught exceptions from Dyson (#34112) 2020-04-15 14:03:14 -07:00
test_bootstrap.py Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00
test_config.py Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00
test_config_entries.py Allow async_setup changes to config entry data be taken into a… (#34166) 2020-04-14 18:46:41 -07:00
test_core.py Collection of random (mainly) test improvements (#33733) 2020-04-06 12:51:48 +02:00
test_data_entry_flow.py
test_loader.py
test_main.py
test_requirements.py
test_setup.py Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00