-
Notifications
You must be signed in to change notification settings - Fork 58
-
Hi,
how can I get all attributes, entities etc. of a zha device once I caught a zha_event. To illustrate, I use the following event_trigger in pyscript:
@event_trigger("zha_event")
def zigbee_zha_event(**kwargs):
log.warning(f"Zigbee zha_event: {kwargs}")
notify.email_me_via_email(title="Zigbee zha_event", message=f"kwargs: {kwargs}")
The kwargs I get back are for example:
kwargs: {'trigger_type': 'event', 'event_type': 'zha_event', 'context': <homeassistant.core.Context object at 0x7f8dc35df0>, 'device_ieee': '00:15:8d:00:09:1b:23:6a', 'unique_id': '00:15:8d:00:09:1b:23:6a:1:0x0006', 'device_id': '9823539c2d722f81b022da838f275fa0', 'endpoint_id': 1, 'cluster_id': 6, 'command': 'attribute_updated', 'args': {'attribute_id': 0, 'attribute_name': 'on_off', 'value': <Bool.false: 0>}, 'params': {}}
But I would like to also get e.g. the name of the device that triggered the event, all the attributes, and also the entities of e.g. the sensors that belong to that device.
Any suggestions? Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment