From 4485cd67680be84a7f67e7447f8434041e96baca Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Tue, 31 Mar 2020 20:24:48 +0200 Subject: [PATCH] Merged two automations for away mode --- automation/away_mode.yaml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/automation/away_mode.yaml b/automation/away_mode.yaml index 17411068..64bc9c3a 100644 --- a/automation/away_mode.yaml +++ b/automation/away_mode.yaml @@ -23,32 +23,22 @@ initial_state: 'on' trigger: + # Manual Disable - platform: state entity_id: input_boolean.home_mode_away to: 'off' - - action: - - service: script.notify_voice - data_template: - message: "Modalità vacanza disabilitata" - -###################################################################### -# Away Mode: Disable -###################################################################### - -- alias: "Modalità Vacanza: Disattivazione" - initial_state: 'on' - - trigger: + # Back home - platform: state entity_id: group.residents to: 'home' + # End of Away Period - platform: template value_template: "{{ states('sensor.time_date') == (state_attr('input_datetime.away_mode_end', 'timestamp') | int | timestamp_custom('%H:%M, %Y-%m-%d', true)) }}" - condition: [] - action: + - service: script.notify_voice + data_template: + message: "Modalità vacanza disabilitata" - service: input_boolean.turn_off data: entity_id: input_boolean.home_mode_away -- 2.47.3