# List all zigbee devices for unavailable automation ``` {% set ids = integration_entities('zha') | map('device_id') | unique | list %} {% set ns = namespace(result=[]) %} {% for s in ids %} {% set ns.result = ns.result + [ [s, device_attr(s, 'name_by_user')] ] %} {% endfor %} {{ ns.result }} ``` # List Z-wave entities fot checking unavailability You need to enable node_status for each device, and they need to have `node_status` suffix ``` {% set ids = integration_entities('zwave_js') | select('search', 'node_status$') | unique | list %} {% set ns = namespace(result=[]) %} {% for s in ids %} {% set ns.result = ns.result + [ [s, device_attr(s, 'name_by_user')] ] %} {% endfor %} {{ ns.result }} ``` # List batteries entities ``` {% set ns = namespace(below=[]) %} {% for s in states.sensor if s.entity_id is search('battery') and s.state != 'unknown' %} {% set ns.below = ns.below + [s.entity_id] %} {% endfor %} {{ ns.below |sort| join(', ') }} ```