Repository navigation
Replace cluster handlers with entity attributes - #657
Conversation
I agree. I think adding event entity support first is the way to go
we need several things to do this correctly .... an additional thing that comes to mind is queuing of commands for sleepy devices for example (if we want to auto apply changes when a new version is created). |
|
Thanks @dmulcahey, fixed 😄 |
|
I think the event For the other points:
|
ZHA's OnOffClientCacheSync (zigpy/zha#657, zha >= 1.4) already turns the on/off/toggle commands a client On/Off cluster receives into the cluster's cached on_off value. With the quirk caching them as well, a toggle was applied twice and cancelled itself out. Keep only the binary sensor declaration on the input endpoint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
See #653 for a different approach.
As an example:
For an individual cluster, all entities referencing that cluster will have their individual cluster configurations combined and then aggregated into binding and attribute reporting requests.
This PR introduces the concept of virtual entities: these are entities that participate in discovery, binding reporting, and so on, same as any other. The only difference is that they have no public API and should be ignored by Core. They effectively replace cluster handlers for the very few circumstances we require something like them and actually cleans up a few hacks.
We should maybe introduce
versionfor entity configuration? Right now, changing a reporting interval or adding new attributes requires a user to manually click "reconfigure". An alternative would be to keep track of all binding and reporting config in the zigpy database anddiffit with the ZHA defaults. We'd need to track whether configuration has been automatically configured or if it was manually pushed, in case someone overrides reporting.This is part of / a requirement for: