Implement notify_events_alerts script and update automation actions to utilize it for event notifications. This enhances consistency and maintainability in alert handling across the configuration files.
This commit is contained in:
@@ -8,12 +8,11 @@
|
|||||||
to: 'on'
|
to: 'on'
|
||||||
conditions: []
|
conditions: []
|
||||||
actions:
|
actions:
|
||||||
- action: notify.notify_events_alerts
|
- action: script.notify_events_alerts
|
||||||
metadata: {}
|
metadata: {}
|
||||||
data:
|
data:
|
||||||
message: Garage floodlight batteries low
|
message: Garage floodlight batteries low
|
||||||
title: Garage floodlight batteries low
|
title: Garage floodlight batteries low
|
||||||
token: !secret notify_event_alerts_token
|
|
||||||
mode: single
|
mode: single
|
||||||
|
|
||||||
- id: '1742841280696'
|
- id: '1742841280696'
|
||||||
|
|||||||
@@ -56,8 +56,7 @@
|
|||||||
- action: switch.turn_off
|
- action: switch.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: switch.parents_window_fan
|
entity_id: switch.parents_window_fan
|
||||||
- action: notify.notify_events_alerts
|
- action: script.notify_events_alerts
|
||||||
data:
|
data:
|
||||||
title: Dehumidifier tank is full
|
title: Dehumidifier tank is full
|
||||||
message: Dehumidifier tank is full — Parents Window Fan outlet has been turned off.
|
message: Dehumidifier tank is full — Parents Window Fan outlet has been turned off.
|
||||||
token: !secret notify_event_alerts_token
|
|
||||||
|
|||||||
@@ -24,3 +24,21 @@ check_day_camp:
|
|||||||
Message={{ state_attr('calendar.family_events', 'message')
|
Message={{ state_attr('calendar.family_events', 'message')
|
||||||
| default('') }}
|
| default('') }}
|
||||||
level: debug
|
level: debug
|
||||||
|
|
||||||
|
notify_events_alerts:
|
||||||
|
alias: Notify.Events Alerts
|
||||||
|
fields:
|
||||||
|
message:
|
||||||
|
required: true
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
title:
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
sequence:
|
||||||
|
- action: notify.notify_events_alerts
|
||||||
|
data:
|
||||||
|
message: "{{ message }}"
|
||||||
|
title: "{{ title | default('Home Assistant') }}"
|
||||||
|
data:
|
||||||
|
token: !secret notify_event_alerts_token
|
||||||
|
|||||||
Reference in New Issue
Block a user