Hello guys,
I would like to ask for help with thermostat climate controller component. During the heating operation I would like to continously check a sensor (input pin) and change which switch should be turned on/off.
This is my sensor:
binary_sensor:
- platform: gpio
pin: 17
id: is_night_power_available
And this is the thermostat component :
climate:
- platform: thermostat
name: "Szoba 1"
sensor: room1_temp1
id: room1_heater
default_target_temperature_low: 20 °C
min_heating_off_time: 30s
min_heating_run_time: 30s
min_idle_time: 3s
heat_action:
then:
- if:
condition:
- binary_sensor.is_on: is_night_power_available
then:
- switch.turn_off: room1_relay_day
- delay: 2s
- switch.turn_on: room1_relay_night
else:
- switch.turn_off: room1_relay_night
- delay: 2s
- switch.turn_on: room1_relay_day
idle_action:
- switch.turn_off: room1_relay_night
- switch.turn_off: room1_relay_day
So based on the sensor value when the heating starts it activates relay_day or relay_night, which is working fine.
But it can happen that during heating the sensor changes its value…So how can I react to it? I must run again the heat_action section, but it only runs once it starts heating.
Thanks for help in advance!