Generic thermostat turning climate device on/off within seconds

I have been having this issue lately with my generic thermostat. The thermostat is controlling my dumb window air conditioners with an RF outlet switch. It turns them on and then within a second or two, it turns them back off. This doesn’t happen all the time. Most of the time it works properly, but I don’t think it is good for the AC units to power cycle that quickly.

Here is my configuration:

  - platform: generic_thermostat
    name: Bedroom Air
    heater: switch.bedroom_ac
    target_sensor: sensor.bedroom_temp # = bedroom_temperature - proximity
    min_temp: 75
    max_temp: 85
    ac_mode: True
    cold_tolerance: 0.2
    hot_tolerance: 0.2
    min_cycle_duration:
      minutes: 5
    away_temp: 80
    keep_alive:
      minutes: 1

Side note, I set the keep_alive for 1 minute because the RF transmitter sometimes doesn’t trigger the outlet switch the first time probably due to placement in the house. That seemed to solve that problem.

The min_cycle_duration should keep the AC from turning off any sooner than 5 minutes from the time it was turned on. Also, I checked the sensor data to make sure there wasn’t a major fluctuation that would have caused it. Any ideas on why the generic thermostat would cycle on/off that quickly?

I also have been experiencing a similar issue. I am just trying to find some answers now, when i stumbled on your post.
Did you ever find a fix or reason why it was happening?

Same issue here, what am i missing?

I found out i had set up two thermostats controlling the same switch. But they were set to different temps. So one kept turning it on and the other turning it off again.
Rookie mistake.

Rookie mistake on my side too.
I realised a while back that i had a script that was being triggered along with the thermostat that was turning the switch off.