Generic Thermostat: Sensor unavailable, Should go OFF?

Hi,

I’m new to HA and I have this situation.

I have a Generic Thermostat using a Target Sensor for Temperature which sometimes just happens to go unavailable (the WiFi signal is weak).

Under such circumstance I would expect the Thermostat to go Off, but it doesn’t. It stays on Heat mode and remembers the last temperature reading from the (unavailable) sensor.

Is there any way I can configure HA to achieve this? (Thermostat going OFF if target sensor is not available)

Thanks!
Juan

I know this is very old post, but did you solved this?

Hi,

kind of :slight_smile: Is not an elegant solution…

What I do is this:

temperature_xiaomi_air_1:
      unit_of_measurement: '°C'
      value_template: "{{ states.fan.xiaomi_air_1.attributes.temperature or 999 }}"
      device_class: temperature

So if the temperature from the sensor is not available, make it very high, eg. 99 or 999 Celsius, that will cause the thermostat to go OFF.

This solution is not ideal because if messes up the sensor history, which sometimes is useful.

Another solution is to add more sensors to the area and group them into one sensor which computes the average, but this of course requires additional hardware.

Another solution yet is to write an automation that switches off the thermostat when the sensor becomes unavailable and turns it one when it is available again. I didn’t go with this solution because I have too many of them and it would translate into a lot of additional code. I just wish this logic was built in into the generic thermostat. Perhaps one day I’ll take up the task and submit a PR. Currently no time…

I hope it helps :slight_smile:
Juan

I was thinking about doing the same thing - return extreme high value so the thermostat will be off.
There is a rewrite of generic thermostat going right now - https://github.com/home-assistant/core/pull/31799 - and I asked for this case. Hopefully finally this use case will be supported.
I can’t imagine going on winter holidays and my whole house would heat up without any control.
If You can please leave a comment on that PR, hopefully it will be merged soon

@Misiu, I think your comment was deleted :slight_smile: Perhaps you should try again.
Pzdr

Sadly I can’t.
I got blocked in entire Home Assistant organization on Github because of that comment. I commented before on that PR but this time someone didn’t like that :frowning: I didn’t wrote anything offensive or off topic. I think this is an important issue and it is good opportunity to solve it.