hass-core/homeassistant/components/philips_js
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
config_flow.py Adjust config-flow type hints in philips_js (#72443) 2022-05-25 09:00:42 +02:00
const.py
device_trigger.py Adjust device_automation type hints in philips_js (#72137) 2022-05-23 14:57:09 +02:00
diagnostics.py Add diagnostics for philips_js (#66233) 2022-02-10 22:11:40 +01:00
light.py Migrate philips_js light to ColorMode (#70877) 2022-04-27 14:23:31 +02:00
manifest.json PhilipsTV - Add Ambilight + Hue switch entity (#69141) 2022-04-05 10:23:07 +02:00
media_player.py Use EntityFeature enum in components (p**) (#69434) 2022-04-07 15:03:42 +02:00
remote.py Update coordinator typing (4) [o-p] (#68464) 2022-03-21 14:45:24 +01:00
strings.json Prettify json (strings.json) (#68885) 2022-03-30 10:35:30 +02:00
switch.py PhilipsTV - Add Ambilight + Hue switch entity (#69141) 2022-04-05 10:23:07 +02:00