Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Automation
- - alias: Offline Zigbee Devices
- id: offline_zigbee_devices
- description: Sends notification for offline Z2m devices
- trigger:
- - platform: time
- at: "20:00:00"
- condition:
- - condition: template
- value_template: >
- {{states('sensor.z2m_last_seen_entities')|int > 0}}
- action:
- - service: notify.telegram
- data:
- title: Missing Devices
- message: >
- {% set phrase = 's are ' if states('sensor.z2m_last_seen_entities')|int > 1 else ' is ' %}
- The following sensor{{ phrase }}missing: {{ state_attr('sensor.z2m_last_seen_entities', 'devices') | join(', ') }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement