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

32 lines
743 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
2023-12-16 14:38:36 +00:00
below: 15
for:
hours: 0
minutes: 1
seconds: 0
2023-12-16 00:46:23 +00:00
entity_id:
{% for entity in entities %}
- {{ entity }}
{% endfor %}
- platform: numeric_state
below: 10
2023-12-16 14:38:36 +00:00
for:
hours: 0
minutes: 1
seconds: 0
2023-12-16 00:46:23 +00:00
entity_id:
{% for entity in entities %}
- {{ entity }}
{% endfor %}
action:
2024-05-19 10:19:29 +00:00
- service: notify.home_assistant
2023-12-16 00:46:23 +00:00
data:
message: >
2024-05-19 10:19:29 +00:00
Low battery
2023-12-16 14:38:36 +00:00
{% raw %}{{ device_attr(trigger.entity_id, 'name_by_user') }} has low battery {{ states(trigger.entity_id) }}% {% endraw %}
2024-05-19 18:03:33 +00:00
target: [ "1109936159951441960" ]