mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
Will pushing from the server break anything?
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
template:
|
||||
- sensor:
|
||||
- name: "Alive ZWave Devices"
|
||||
- name: "ZWave: All Devices"
|
||||
unique_id: template_sensor_alive_zwave
|
||||
icon: mdi:z-wave
|
||||
state: >-
|
||||
{{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") |
|
||||
selectattr('state', 'in', 'alive') |
|
||||
@@ -9,14 +10,14 @@ template:
|
||||
|
||||
- name: "Dead ZWave Devices"
|
||||
unique_id: template_sensor_failed_zwave
|
||||
icon: mdi:z-wave
|
||||
state: >-
|
||||
{% if states('sensor.alive_zwave_devices')|int(default=0) > 0 %}
|
||||
{{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") |
|
||||
selectattr('state', 'in', 'alive') | map(attribute='entity_id')| list | count | int(default=0)}}
|
||||
attributes:
|
||||
devices: >-
|
||||
{{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") |
|
||||
selectattr('state', 'in', 'dead') |
|
||||
map(attribute='entity_id')| list | count | int(default=0)}}
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
selectattr('state', 'in', 'alive') | map(attribute='entity_id')| list }}
|
||||
|
||||
automation:
|
||||
- id: automation_alert_failed_zwave_nodes
|
||||
|
||||
Reference in New Issue
Block a user