Dormant Generic thermostat turning off associated switch at random times

Referencing another post here for the same issue, just thought my title makes more sense

I have a few generic thermostats that are turned off and on as needed. Them spend most of their time off. Lately I’ve noticed that the associated switches for some of them, which I manually turn on and off a lot of the time, have been getting turned off automatically.

The message in the logs looks like this:

[homeassistant.components.generic_thermostat.climate] The climate mode is OFF, but the switch device is ON. Turning off device switch.sonoff_10017c36c2

This is like 3 hours after I’d turned on the switch but not the thermostat. Thermostat had been off for 9 hours or so.

Anyone know how to stop the generic thermostat from risinf from the grave and flipping my switches?

I don’t think you can. I see that also but it seems to only happen at startup of HA.

Do you have keep alive set its configuration?

This is great if this happens.
I think the thermostat should do it much quicker.

I actually filed a bug report on this a few months ago. As I see it, if the thermostat is off or the temperature is above set point then the generic thermostat should switch off the heater if it was turned on.
As I see it the thermostat should govern the temperature and heater.
Allowing the user to fiddle with the heater manually should not be allowed.

Please post your configuration

@PeteRage Who are you talking to?

Maybe I was unclear. This is during instances where the gen thermostat is OFF and I want to manually turn a device on and keep it on. Otherwise, if you’ve got a gen thermostat coded in your configuration file any device it refers to is permanently governed by that thermostat. Kinda limiting…

Which one would you like to see?
Here’s one of the thermostats:

platform: generic_thermostat
    name: DS HWC Topup Thermo
    unique_id: DS_HWC_Topup_Thermo
    heater: switch.sonoff_10017c36c2
    target_sensor: sensor.sonoff_10017c36c2_temperature
    ac_mode: false
    target_temp: 60
    max_temp: 69
    min_temp: 30
    min_cycle_duration:
      seconds: 60
    precision: 1
    ```

Why would this be limiting?
You use a thermostat by changing the setpoint.
Just like any other heater.

If you look at water radiators, do you have an “on” button?
Underfloor heating? Does it have a on button?
A space heater might have a simple on/off, but most have a thermostat.
If you set up a generic thermostat then you do that with the intention to use the thermostat, right?

What if you accidentally turn on the heater when the temperature is above the setpoint, do you really feel that is appropriate that HA just leaves it on forever (or until restart/reload config)?

If a restart or config reload makes the device switch off then that is because the device should not be on.
That to me seems obvious that there is a bug.

I can’t find any reason why you would want to allow manual control by default since it can only risk an out of sequence setting (where heater is on at over temp, or off when under temp).
A thermostat should be controlled by the setpoint. If the thermostat is off then the heater should be off.
Just like any other thermostat.
If you turn the water radiator thermostat to 0 then you can’t manually feed water in the radiator.

As said, I find this a bug, but if you want manual control then I could see a third option on the generic thermostat “manual”.
But on and off is in my opinion reserved for auto mode or off.