1
0
ansible-home-assistant/templates/low-battery.yaml.j2

23 lines
578 B
Plaintext
Raw Normal View History

2023-12-16 00:46:23 +00:00
- id: info_low_battery
alias: '[INFO] Low battery'
mode: single
trigger:
- platform: numeric_state
below: 20
entity_id:
{% for entity in entities %}
- {{ entity }}
{% endfor %}
- platform: numeric_state
below: 10
entity_id:
{% for entity in entities %}
- {{ entity }}
{% endfor %}
action:
- service: notify.mobile_app_iphone
data:
title: "Low battery"
message: >
2023-12-16 14:17:02 +00:00
{% raw %}{{ state_attr(trigger.entity_id, 'name_by_user') }} has low battery {{ states(trigger.entity_id) }}% {% endraw %}