Commit graph

8 commits

Author SHA1 Message Date
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
Franck Nijhof
1c94431efe
Handle WLED devices with CCT channels (#64581) 2022-01-21 09:19:50 +01:00
Paulus Schoutsen
8dbff0b4b3
Fix WLED exception on close (#57752) 2021-10-15 09:04:43 +02:00
Paulus Schoutsen
3c11e2a097
Add entity category to WLED (#57693) 2021-10-14 13:31:01 -07:00
Marc Mueller
364767ff22
Import Callable from collections.abc (4) (#56778) 2021-09-29 16:15:36 +02:00
Franck Nijhof
a67ca08124
Change dynamic segment handling of WLED (#52018) 2021-06-23 23:43:24 +02:00
Franck Nijhof
b83b82ca7d
WLED WebSocket support - local push updates (#51683)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-06-11 20:55:08 +02:00
Franck Nijhof
332c86ff8c
Restructure WLED integration (#51667) 2021-06-09 20:15:46 +02:00