OK, that’s a plausible failure scenario. I’ll need to replace the temperature sensor entity with an input_number so I simulate the same conditions.
What perplexes me is why this failure scenario purportedly only manifests itself for a switch but not an input_boolean. The Generic Thermostat’s code simply use a turn_on/turn_off service so it should behave the same regardless of whether it’s a switch or an input_boolean (i.e. as long as the entity responds to turn_on/turn_off, it should work the same).
Anyway, I completely understand why, given that you already a reliable alternative, this quirk is no longer on your radar.
I agree it makes no sense, but it’s a regular problem as evidenced above.
As you can imagine I did put a lot of work into it at the time but never found a solution, just people saying “works for me”, or saying “I had the same problem and never found a solution”.
All I can say is there’s definitely a bug somewhere, but it doesn’t seem to be ‘reproducible’ (in the sense of if I do this it works, but as soon as I do that…) - the whole thing either works for people or it doesn’t with no obvious cause. The only thing that appears to link the cases is the use of a switch domain, but many people use switches without issue, so in the words of the prophet…
As a data point, I was also unable to use a switch and thermometer, but changing to an input_boolean (that controls the switch through an automation) and input_number (that is update from an automation) makes the thermostat work.
The switch is an insteon 2663-222 outlet and the thermometer is off of an aeotec multi-sensor 6.
I do also want to acknowledge how difficult it is to troubleshoot so many different permutations of configurations that people can have and how all of those are abstracted into HA and appreciate how much effort has gone into making things work so well.
This is funny (peculiar)
Like you, I have generic thermostats set up, the boiler one is set to run the actual boiler. The cooling one is set to control a fake switch (template) I then mirror the fake to fans (mainly extract) both of them work flawlessly.
Having said that I agree with @anon43302295 that having observed them in action, I could probably do just as well (or even better) with automations (maybe 4 but possibly just 2)
I leave both running 24/7 and just vary the set points (heating) for the conditions extant.
I just find the thermostats ‘convenient’
It’s intregueing that it ‘sometimes’ doesn’t work, I’ll try to wipe a test instance and try one from scratch.
Got it to work.
After 3 days .
Honestly probably some typo somewhere and a big pile of stupid from my side.
One thing I can suggest is how to thermostat actually works, that could have saved me some time.
When I was pressing the flame icon I expected to turn on heating and it entered Idle mode, I didn’t understand why.
The flame icon it’s like master On switch for the thermostat. First you switch it on after that try working with it, to see if it’s heating/switching correctly.
The other suggestion instead of switch try the input_boolean, way faster for testing.
I have the same problems, the heating information does not appear. But physically everything works. I still give an error from the log, it looks like it does not receive information about the status of the head, but one of my automation works with him, so this information must be in the system.
I have this weird issue… The thermostat will control the relay appropriately when I manually adjust the temperature in thermostat card above/below current temperature, however it will not trigger automatically in background when actual temperature changes.
I had my thermostat setup and it was working as designed for couple of weeks. It is taking temperature from xiaomi BLE sensor and controlling a zigbee relay.
Not sure if this is related, but will say this anyway: I had some issues with my zigbee setup. I am running ZHA and wanted to try zigbee2MQTT. After enabling and quickly disabling that addon, all my zigbee devices were no longer “in range” in ZHA. So decided to restore a backup from a day ago. After this, HA has decided the database is corrupt and dumped it, starting fresh. I still had to re-add all zigbee devices manually. I believe all device and entity names remain the same. All other automations are still working, however thermostat function is broken.
What could have happened and how do I diagnose this?
I appear to have the same issue as others in this thread describe. Take note that I am a COMPLETE noob and installed HA yesterday on a NUC. I can’t code or anything remotely like it. I’m not stupid though (I swear!).
I have a Tuya switch with a heater plugged into it. The switch iss controllable by lovelace I can confirm.
I have a Sonoff Zigbee temp and humi sensor connected to a zigbee bridge that is displaying on a card.
Now I want to use the generic thermostat platform and have entered the following into my configuration.yaml
But it does nothing. Currently the temp sensor is reading 21 C but the switch isn’t coming on.
Any assistance would be appreciated. I see above that users talk about using bolean instances or some such, I don’t know what they’re on about so if that is the work around if someone could point me in the right direction that’d be great.
I just had similar issue.
For me the issue seems to have been that my template switch did not like to toggle.
I changed it to a input_boolean ( You can create one with UI in helpers, they are called Toggles in there) and worked straight away.
You could than use that input_boolean state to control your switch.
Also make sure your sensor gives out a temperature.
Two things I was missing - I needed to give the thermostat entitie a unique_id and then add it to a card in lovelace so it could be turned on/off or adjusted. That solved my issue
Hi all, I also had a large amount of trouble getting generic_thermostat to work, controlling a simple fan. It would be all hooked up correctly, and in lovelace dashboard card I could see the live room temperature, and also could click to toggle on the fan manually. But the thermostat would never turn the fan on.
I eventually solved it by setting: initial_hvac_mode: "cool"
Now the thermostat card is automatically turning the fan on and off. It seems setting initial_hvac_mode: "off"
somehow stops it from ever turning the output switch on.
Hi, I’ve also been experiencing this very frustrating issue of a generic thermostat behaving erratically (eg thermostat is enabled (heating) on ‘comfort’ preset at a 20°C target, but switch stays inactive even when temp goes 4°C below target with a ‘cold’ tolerance of 0.5°C). This behavior is unpredictable, because sometimes it does work as expected too…
Interestingly I have two independent generic thermostats, controlling two distinct heaters in two rooms and different temp sensors. The first works exactly as expected, the on/off switch being via MQTT. The second is erratic, the on/off being via a Shelly1 Wifi relay (using CoIoT protocol, whatever that is).
Having noticed the erratic thermostat has fine interruptions in the orange colored “heating” under the temp curve, I’m wondering if the erraticness might be due to some communication issues between HA and the remote WiFi switch.
Screen shots of the two thermostat graphs showing the interrupted orange area under the curve for the erratic instance :
These discontinuous orange areas under the curve are also visible further up in the thread associated with the exact same erratic behavior of the generic thermostat.
I’m making changes to the way the Shelly communicates with HA, I’ll report back if this confirms or even solves this issue.
Come to think of it, I wonder if the workaround proposed bu the OP (tying the thermostat to a boolean instead of the actual switch) might work by providing the continuous stability generic thermostat requires to function correctly (ie hiding the HA-switch connections interruptions from the thermostat’s view…).