1
0
ansible-home-assistant/roles/scripts/templates/check-unavailable.yaml.j2

18 lines
646 B
Plaintext
Raw Normal View History

check_unavailable:
alias: '[INFO] Check unavailable devices'
sequence:
{% for entity in entities %}
- choose:
- conditions:
- condition: state
entity_id: {{ entity }}
state: unavailable
sequence:
- service: notify.home_assistant
data:
message: >
Device unavailable
{% raw %}{{ {% endraw %} device_attr('{{entity}}', 'name_by_user'){% raw %} }} ( {{ {% endraw %} device_attr('{{entity}}', 'name') {% raw %} }} ) {% endraw %}is unavailable
target: [ "1109936159951441960" ]
{% endfor %}