hass-core/homeassistant/components/modern_forms
Joakim Plate 8910d265d6
Keep track of a context for each listener (#72702)
* Remove async_remove_listener

This avoids the ambuigity as to what happens if same callback is added multiple times.

* Keep track of a context for each listener

This allow a update coordinator to adapt what data to request on update from the backing service based on which entities are enabled.

* Clone list before calling callbacks

The callbacks can end up unregistering and modifying the dict while iterating.

* Only yield actual values

* Add a test for update context

* Factor out iteration of _listeners to helper

* Verify context is passed to coordinator

* Switch to Any as type instead of object

* Remove function which use was dropped earliers

The use was removed in 8bee25c938
2022-06-03 13:55:57 +02:00
..
translations [ci skip] Translation update 2022-05-21 00:22:49 +00:00
__init__.py Keep track of a context for each listener (#72702) 2022-06-03 13:55:57 +02:00
binary_sensor.py
config_flow.py Use dataclass properties in modern_forms discovery (#60584) 2021-11-30 10:18:25 +01:00
const.py
fan.py Use EntityFeature enum in components (m**) (#69414) 2022-04-06 17:33:41 +02:00
light.py Use ColorMode enum in modern_forms (#70523) 2022-04-23 09:24:19 -10:00
manifest.json Prettify json (manifest.json) (#68886) 2022-03-30 10:56:37 +02:00
sensor.py Use new enums in modern_forms (#61930) 2021-12-15 20:40:38 +01:00
services.yaml
strings.json
switch.py