Get Zigbee2MQTT (Z2M) entities in a Home Assistant template
If you’re using Zigbee2MQTT (Z2M) with Home Assistant, you might need to access your Z2M entities within templates. You can use the following template the get all of the entity_id
s provided by Zigbee2MQTT:
{{ integration_entities('mqtt') | select('is_device_attr','via_device_id', device_id('Zigbee2MQTT Bridge')) }}
This will retrieve all of the MQTT entity IDs specifically provided by Zigbee2MQTT and can be used for other automations or scripts. You can also use the expand
filter to convert all of these entities to objects for even more filtering.
For more information on templating, be sure to check out the Home Assistant Templating Documentation.
This entry was posted on Thursday, January 9th, 2025 at 7:38 pm and is filed under Home Assistant. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.