Got the script working perfect! Thanks a lot!!!!
Some changes need to be done, so it will work properly.
1) when the script is switched off, the heating must also be switched off directly in event based script
2) provided script toggels the heater (switches on/off the heater) every 1 minute due to wrong hysteresis logic. So it tries to reach the temperature =set_temperature-hysterese.
I changed the logic to following:
Best regards.
Some changes need to be done, so it will work properly.
1) when the script is switched off, the heating must also be switched off directly in event based script
2) provided script toggels the heater (switches on/off the heater) every 1 minute due to wrong hysteresis logic. So it tries to reach the temperature =set_temperature-hysterese.
I changed the logic to following:
Code:
if current_temp < set_temperature - hysteresis and
window_closed and
motion_minute_counter < one_hour and
not heater_status then -- heater is off
grp.write('heater', true)
end
if (current_temp > set_temperature or not window_closed) and heater_status then
grp.write('heater', false)
end
Best regards.