diff --git a/automations/02_alerts_and_notifications.yaml b/automations/02_alerts_and_notifications.yaml index 3206909..06e7cf3 100644 --- a/automations/02_alerts_and_notifications.yaml +++ b/automations/02_alerts_and_notifications.yaml @@ -8,12 +8,11 @@ to: 'on' conditions: [] actions: - - action: notify.notify_events_alerts + - action: script.notify_events_alerts metadata: {} data: message: Garage floodlight batteries low title: Garage floodlight batteries low - token: !secret notify_event_alerts_token mode: single - id: '1742841280696' diff --git a/automations/07_climate_and_plugs.yaml b/automations/07_climate_and_plugs.yaml index 72d72f3..e227ef3 100644 --- a/automations/07_climate_and_plugs.yaml +++ b/automations/07_climate_and_plugs.yaml @@ -56,8 +56,7 @@ - action: switch.turn_off target: entity_id: switch.parents_window_fan - - action: notify.notify_events_alerts + - action: script.notify_events_alerts data: title: Dehumidifier tank is full message: Dehumidifier tank is full — Parents Window Fan outlet has been turned off. - token: !secret notify_event_alerts_token diff --git a/scripts.yaml b/scripts.yaml index e0547d3..c226a92 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -24,3 +24,21 @@ check_day_camp: Message={{ state_attr('calendar.family_events', 'message') | default('') }} 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