Unexpacted behaviour with generic thermostat

Hey all,
I have a xiaomi sensor, and smart switch in one of my bedrooms, so wanted to have go at using the generic thermostat with a space heater. I have the target temp set to 20 degrees, but as it’s a space heater, I want it to activate at 18 degrees, turn off at 20, then turn on again at 18 (mainly to save energy).

I’ve set my cold tolerance at 2 degrees. It turns on at 18 degrees, but then it just stayed on.

Here’s my configuration:

climate:
  - platform: generic_thermostat
    name: Oscar's Room
    heater: switch.0x00158d0002560f81_switch
    target_sensor: sensor.0x00158d0002b952ad_temperature
    min_temp: 15
    max_temp: 24
    ac_mode: false
    target_temp: 20
    cold_tolerance: 2
    initial_operation_mode: "off"

And here’s the history for the time in question:

What about this behavior is unexpected? It doesn’t look like it’s staying on to me. The Yellowish shading represents when the heater is “on” and it looks like it turned off when the temp got just above 20 (you can set heat_tolerance: 0 if you want it off at exactly 20).

What I wanted it to do, was once the temp crossed that green line, it switches off. I was expecting lots of short yellow bars, rather than one large one. Therefore, the temperature readings would have had that “warehouse” pattern, rather than flat (and therefore consume about half, or less electricity).

In the above example, the space heater turned off once the main ducted heater turned on (which blasts a LOT of heat, of course), after staying on for maybe 4 consecutive hours.

So take this advice:

1 Like

Der - missed that!