Restarts force resetting thermostat mode

I have five rooms with individual temperature sensors controlling heating panels via WiFi plugs and generic thermostats. The setup is working fine.

The issue I have is that each time I update Home Assistant and it reconnects, all the thermostats revert to “Off” mode and I have to manually go to each thermostat and select “Heat” mode again. If I forget to do so, the house sometimes cools down before I notice my oversight.

Automations seem unaffected.

Is there a setting that will allow the thermostats to “remember” their most recent mode setting after the restart? This would not mean that they would all be in “Heat” mode automatically, but rather that they simply continue where they left off.

I eventually found the solution myself.

In the climate.yaml file that holds the thermostat settings I commented out the following line for each thermostat:

initial_hvac_mode: “off”

The thermostats now “remember” their mode settings after a restart even though the temperature sensor has not signaled a change in temperature.