1
mirror of https://github.com/home-assistant/core synced 2024-07-30 21:18:57 +02:00
ha-core/homeassistant/scripts
J. Nick Koston 34ccb6588c
Cleanup async_track_state_change and augment docstring (#37251)
* Cleanup async_track_state_change and augment docstrings.

Skip from_state and to_state matching in
async_track_state_change when they are None

Optimize the state change listener for the most
common use case: no to_state and from_state
matching.

* Update benchmark to be more realistic (previously we assumed only one entity was present in the whole instance)

* Add more tests to ensure behavior is preserved

* Ensure new behavior matches test

* remove MATCH_ALL from zone automation since its the default anyways

* Might as well use async_track_state_change_event instead since MATCH_ALL is removed
2020-07-05 17:31:33 -05:00
..
benchmark Cleanup async_track_state_change and augment docstring (#37251) 2020-07-05 17:31:33 -05:00
macos Remove redundant open modes (#33652) 2020-04-04 22:49:15 +02:00
__init__.py Various string cleanups (#30435) 2020-01-03 14:47:06 +01:00
auth.py Sort imports according to PEP8 for 'homeassistant' folder (#29789) 2019-12-09 16:42:10 +01:00
check_config.py Check isinstance on collections.abc, not typing classes (#35087) 2020-05-02 23:57:48 +02:00
credstash.py Enable pylint import-outside-toplevel (#33631) 2020-04-04 17:07:36 +02:00
ensure_config.py Add Safe Mode (#30723) 2020-01-14 13:03:02 -08:00
keyring.py Upgrade keyring to 21.2.0 (#34084) 2020-04-12 13:36:34 +02:00