From cfe1659470b35b799f07858a6436d23c0ecd0bf9 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Sun, 12 Jan 2020 18:10:47 +0100 Subject: [PATCH] Added update notification files & hacs notifications --- automation/home_assistant.yaml | 19 ---------- automation/shelly.yaml | 19 ---------- automation/update_notifications.yaml | 57 ++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 38 deletions(-) delete mode 100644 automation/shelly.yaml create mode 100644 automation/update_notifications.yaml diff --git a/automation/home_assistant.yaml b/automation/home_assistant.yaml index d103521d..e8788355 100644 --- a/automation/home_assistant.yaml +++ b/automation/home_assistant.yaml @@ -109,25 +109,6 @@ data: entity_id: input_boolean.speech_notifications -###################################################################### -# Home Assistant: Update Available Notifications -###################################################################### - -- alias: "Home Assistant: Notifica aggiornamento" - initial_state: 'on' - - trigger: - - platform: state - entity_id: binary_sensor.updater - to: 'on' - - action: - - service: script.notify_text - data_template: - title: "Home Assistant - Aggiornamento" - message: "E' disponibile un aggiornamento per Home Assistant {{ state_attr('binary_sensor.updater', 'newest_version') }}. {{now().strftime('%Y-%m-%d %I:%M %p')}}" - enable_persistant: true - ###################################################################### # Home Assistant: Startup Automation # - Sync with Google Assistant diff --git a/automation/shelly.yaml b/automation/shelly.yaml deleted file mode 100644 index 2db456c3..00000000 --- a/automation/shelly.yaml +++ /dev/null @@ -1,19 +0,0 @@ -###################################################################### -# Shelly: Update Available Notifications -###################################################################### - -- alias: "Shelly: Notifica aggiornamento" - initial_state: 'on' - - trigger: - - platform: state - entity_id: group.shelly - to: 'on' - - action: - service: script.notify_text - data_template: - title: "Shelly - Aggiornamento" - message: "Sono disponibili aggiornamenti per i dispositivi Shelly" - enable_persistant: true - diff --git a/automation/update_notifications.yaml b/automation/update_notifications.yaml new file mode 100644 index 00000000..d15a7c9a --- /dev/null +++ b/automation/update_notifications.yaml @@ -0,0 +1,57 @@ +###################################################################### +# Update Notification: Home Assistant +###################################################################### + +- alias: "Update Notification: Home Assistant" + initial_state: 'on' + + trigger: + - platform: state + entity_id: binary_sensor.updater + to: 'on' + + action: + - service: script.notify_text + data_template: + title: "Home Assistant - Aggiornamento" + message: "E' disponibile un aggiornamento per Home Assistant {{ state_attr('binary_sensor.updater', 'newest_version') }}. {{now().strftime('%Y-%m-%d %I:%M %p')}}" + enable_persistant: true + +###################################################################### +# Update Notification: Shelly +###################################################################### + +- alias: "Update Notification: Shelly" + initial_state: 'on' + + trigger: + - platform: state + entity_id: group.shelly + to: 'on' + + action: + service: script.notify_text + data_template: + title: "Shelly - Aggiornamento" + message: "Sono disponibili aggiornamenti per i dispositivi Shelly" + enable_persistant: true + +###################################################################### +# Update Notification: HACS +###################################################################### + +- alias: "Update Notification: HACS" + initial_state: 'on' + + trigger: + - platform: numeric_state + entity_id: sensor.hacs + above: 0 + + action: + service: script.notify_text + data_template: + title: "HACS - Aggiornamento" + message: "Sono disponibili aggiornamenti per i dispositivi Shelly" + enable_persistant: true + -- 2.47.3