Generic thermostat can be turned on forever

I’m not sure if this is a bug or a feature request, but I’m reporting as a feature request to be cautious.

It’s possible that a wireless thermometer gets unavailable for a few minutes. This means it’s possible that a low temperature triggers a heater to turn on, but it never turns off.

I see 2 ways to handle this issue:

  1. Define “max sensor unavailability” attribute, which would make sure the heater turns off if the sensor is unavailable for more than some time.
  2. Define “min minutes off” and “max minutes on” attributes, which would make sure the heater turns off after “max minutes on” and can only turn back on after “min minutes off”.

I think the first method is more reliable.

I can try to make a PR if devs think this makes sense.

This is probably better reported as an issue.

It seems the integration may be ignoring state changes from unavailable to <some temperature> when the sensor reconnects.