You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explicit entity object discovery, lifetimes, and registration (#365)
* Make entity lifecycle more explicit
* Fix tests
* WIP: Clean up a bit more
* WIP: Add `_remove_callbacks`
* WIP: Centralize entity registration
* Move over a few more `__init__` event handlers
* WIP: Replace `create_platform_entity` with `is_supported`
* WIP: Remove device initialization checks and actually use `is_supported`
* Initialize the device only after entities are created
* WIP
* Explicitly register cluster handlers
* Test: introduce `Entity.recompute_capabilities()`
* Test: migrate a few more entities to `recompute_capabilities`
* Only check if an entity is supported after cluster handler initialization
* One more `recompute_capabilities` for sensor
* Test: add `Entity._always_supported` to properly deal with v2 quirks
* Fix remaining failing non-discovery tests
* Fix cluster handler edge case not calling `on_add()` (thanks @dmulcahey!)
* Clean up definition format
* Fix typing
* Fix pre-commit issues
* Fix remaining tests
* Rename `_maybe_create_device_entities` to `_maybe_create_entities`
* Fix last failing unit test
* Give `get_entity` a strict mode
* Fix remaining tests
* Drop strict mode by fixing violations
* "Fix" final unit test
* Implement `endpoint.on_remove`
* Move entity creation onto the device object
* Make initialization and configuration logic more explicit
* Retain the old behavior of implicit initialization during rejoin
* Remove `single_device_matches` in favor of explicit entity checks
WIP
* Clear out unsupported entities in reverse order
0 commit comments