icon: mdi:home-thermometer
######################################################################
-# Central Heating
+# Central Heating
######################################################################
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:
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