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
At the moment one has to use the ucapi.configured_entities.update_attributes method to change an entity attribute.
With the new entity command handler, this is a bit akward. The received entity object should allow direct attribute updates, which also trigger a change event. Directly modifying an attribute on the received entity will not trigger any events.
Proposed changes:
add an update_attribute method to the entity class
either a generic method for all subclassed entities, or a concrete method per entity.
for most use cases, a single attribute update is enough. But there are cases where multiple attributes must be updated at the same time, e.g. for light color changes.
Either add an additional update_attributes method, or design a single method which allows both.
At the moment one has to use the
ucapi.configured_entities.update_attributes
method to change an entity attribute.With the new entity command handler, this is a bit akward. The received entity object should allow direct attribute updates, which also trigger a change event. Directly modifying an attribute on the received entity will not trigger any events.
Proposed changes:
update_attribute
method to the entity classupdate_attributes
method, or design a single method which allows both.This could then be used in a command handler:
The text was updated successfully, but these errors were encountered: