From 7a1767f8275af537cf578fea8d88ac085ac2c73c Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Sun, 16 May 2021 19:13:06 +0200 Subject: [PATCH] Fixed Central Heating de-activation. --- packages/central_heating.yaml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/central_heating.yaml b/packages/central_heating.yaml index 168fc7db..71532f41 100644 --- a/packages/central_heating.yaml +++ b/packages/central_heating.yaml @@ -26,7 +26,7 @@ input_boolean: icon: mdi:home-thermometer ###################################################################### -# Central Heating +# Central Heating ###################################################################### automation: @@ -41,19 +41,13 @@ automation: event: start - platform: time at: '00:00:00' - - platform: state - entity_id: input_boolean.central_heating - to: 'on' - - platform: state - entity_id: input_boolean.central_heating - to: 'off' condition: [] action: - choose: # Switch on - - conditions: "{{ now().month == 11 and now().day == 1 }}" + - conditions: "{{ now().month == 11 and now().day == 1 and is_state('input_boolean.central_heating', 'off') }}" sequence: - service: input_boolean.turn_on data_template: @@ -62,11 +56,11 @@ automation: data_template: title: "Home Assistant - Riscaldamento Centralizzato" message: "Il riscaldamento centralizzato è stato acceso" - + # Switch off - - conditions: "{{ now().month == 4 and now().day == 15 }}" + - conditions: "{{ now().month == 5 and now().day == 15 and is_state('input_boolean.central_heating', 'on')}}" sequence: - - service: input_boolean.turn_on + - service: input_boolean.turn_off data_template: entity_id: input_boolean.central_heating - service: script.notify_text -- 2.47.3