Zigbee Device ID?

I use several Sonof Zigbee buttons in my automations. The automation triggers are zha_events. This is a typical trigger I use:

platform: event
event_type: zha_event
event_data:
  device_ieee: 00:12:4b:00:1c:d6:0f:66
  command: toggle

To differentiate between the buttons I’ve used the device_ieee, but I’m not sure whether I should use another id. The ids I see for a device are typically:

device_ieee: 00:12:4b:00:1c:d6:0f:66
unique_id: 00:12:4b:00:1c:d6:0f:66:1:0x0006
device_id: 9f0ee931ae72b1bfed726862782921bb

Which id should I use and do I need to add more event_data to tie the event to a specific device, please?

Jim

1 Like

Device IEEE.

Please consider updating the ZHA integration documentation yourself with any missing information or at least open a new issue to report what more is needed in ZHA docs and why for attention of others:

https://www.home-assistant.io/integrations/zha

https://github.com/home-assistant/home-assistant.io/blob/current/source/_integrations/zha.markdown

https://github.com/home-assistant/home-assistant.io/issues

I had the same question, I suppose it doesn’t really matter, but I’d like to know the “correct” choice.`

You should use the Device IEEE (device_ieee).

Please consider updating the ZHA integration documentation yourself with any missing information or at least open a new issue to report what more is needed in ZHA docs and why for the attention of others:

https://www.home-assistant.io/integrations/zha

https://github.com/home-assistant/home-assistant.io/blob/d52f7b3f4288bc3e070c6780c3e4e106e345822e/source/_integrations/zha.markdown

https://github.com/home-assistant/home-assistant.io/issues