I cannot replicate your results. In other words, I have a Generic Thermostat that successfully controls a switch entity.
Here’s the configuration. For this experiment, I used a switch that controls a bathroom exhaust fan (I don’t have a switch entity that controls a heater).
You’ll notice the ambient temperature is 20.7 and the target temperature is 21.5. However, it is not currently heating because it is Off (notice the ‘flame’ icon is dimmed whereas the ‘power’ icon is bright).
After clicking the ‘flame’ icon to enable heating, the status changes from Off to Heating and the bathroom fan turns on (‘flame’ icon is red and the ‘power’ icon is dimmed).
Can others duplicate this behavior or does it not even get this far?
It’s been a while since I tried it, and I have no inclination to conduct any further tests currently, but if I remember correctly setting the temperature of the thermostat to above the current ambient temperature in the ui did work. The problem was when the ambient temperature dropped below the desired temperature that was previously set and/or the thermostat mode was changed from off to heat.
As I said it was a long time ago, but it simply didn’t work and we would often find ourselves sat in a cold house with the generic thermostat in heat mode, the ambient temperature being below the desired temperature and the generic thermostat sitting idle.
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.