Climate generic thermostat does restore preset mode after restart, but with the wrong temps

Folks,

Im using a generic thermostat. And since some time now, the thermostat remembers it last HVAC mode after a HA restart, thats just working fine, since I dont have a hvac mode set in the config any more

Now I have the issue, that the thermostats always forget their temps related to the set preset mode like away or comfort.

Did a HA restart after the recent update, and my office startet heating in normal mode, all day today, totally for nothing, 84kwh wasted. I just found that out. :roll_eyes:

How do I make the thermostat not only go back to the preset mode he was in before the restart but actually pull the right temps from the config for that preset mode?

Could I read the last known temp setting (not regarding any preset modes) from the DB and set the thermostat to this on HA-start?

On the next preset mode trigger from the automation, this “emergency setting” will be overwritten anyway. So if I dont have a restart right while the temps would have been changed by the automation, it would be fine.

Right?

How would I accomplish this?

image

the funny thing is, it shows away and off in the thermostat, but is set to the “none” temperature… something fishy is going on here.

one of the two started heating this time, the other did not, as of yet.

this morning I found, that both thermostats, while showing “leerlauf” = neutral / idle and “abwesend” = away, but while set to the “none” preset temps after the HA reboot; started heating after a while. so I had a whole night heating my office for nothing :roll_eyes: :cry:

image

from looking at this temp graph I think that both started heating when the cold tolerance was passed.

this is my yaml code


- platform: generic_thermostat
  name: Büroheizung
  heater: switch.steckdose_sm_heizung
  target_sensor: sensor.buero_temperature
  min_temp: 10
  max_temp: 24
  ac_mode: false
  target_temp: 21.5
  cold_tolerance: 0.5
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 240
#  initial_hvac_mode: "off"
  away_temp: 10
  comfort_temp: 24
  precision: 0.5

- platform: generic_thermostat
  name: Badheizung
  heater: switch.bad
  target_sensor: sensor.bad_temperature
  min_temp: 10
  max_temp: 21
  ac_mode: false
  target_temp: 17
  cold_tolerance: 0.5
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 60
#  initial_hvac_mode: "off"
  away_temp: 10
  precision: 0.5

any hints what Im doing wrong?

I’m having the same problem now, anyone come up with a solution?

and how that may fix the problem?

I still have it, just discoverd it on a reboot again…

I really did pay big $ to Putin in the past year for this HA thing, wasting thousands of kwh at now 0,45€/kwh for heating an empty office during weekends and nights after a config update and restart of HA.

What the heck is so difficult for HA to read the last state from the DB and restore it after startup.

If it should have been adjusted by automation while restarting and not doing that, thats totally understandable, no bitching from my side.

But plainly forgetting the set temp while showing the right status like away, that just well, its really bad behavoir.

I have exactly the same problem - generic thermostat doesn’t remember the preset temperature after reboot (but it keeps the correct preset mode).

Have you solved it somehow or this bug just keeps there in HA?
Thanks.