Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - sensor:
- - name: "Dead ZWave Devices"
- unique_id: dead_zwave_devices
- unit_of_measurement: entities
- state: >
- {% if state_attr('sensor.dead_zwave_devices','entity_id') != none %}
- {{ state_attr('sensor.dead_zwave_devices','entity_id') | count }}
- {% else %}
- {{ 0 }}
- {% endif %}
- attributes:
- entity_id: >
- {{
- expand(integration_entities('Z-Wave JS') )
- | selectattr("entity_id", "search", "node_status")
- | selectattr('state', 'in', 'dead, unavailable, unknown')
- | map(attribute="object_id")
- | map('regex_replace', find='(.*)_node_status', replace='button.\\1_ping', ignorecase=False)
- | list
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement