From: Giorgio Ravera Date: Tue, 31 Mar 2020 18:24:48 +0000 (+0200) Subject: Merged two automations for away mode X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=4485cd67680be84a7f67e7447f8434041e96baca;p=homeassistant.git Merged two automations for away mode --- 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