I have three thermostats configured. Two are Venstar thermostats and they work fine. The third is a generic thermostat for the office, which has a temperature sensor and a switch that turns on a simple heater. The temp sensor works and the switch works. I have the following configuration for the thermostat/climate settings:
When I add the thermostat to my UI, it works fine. However it does not actually switch the device. The temperature short up correctly and I can adjust the set point. I have set it to āheatā etc.
Basically. It looks great, but doesnāt actual do anything.
I just threw something together using random entities and it works. I used an input_boolean for heater and a sensor that reports a numeric value for target_sensor.
Idle:
Heating:
The associated input_boolean gets turned on/off as would be expected (of a switch controlling an actual heater).
Just for fun, open the Climate cardās overflow menu (three dots in the upper right hand corner) and check what is selected for Preset. It should be None (as opposed to Away). Scratch that; itāll report if itās in Away mode.
ok. That works fine. However when I put in the switch it doesnāt work. Am I to assume this is the correct behaviour in that it can only work with an input_boolean, or should it also work with a switch. Seems a little pointless if it wonāt work with a switch right? Or am I missing something?
Thanks for your help. At least I feel I am getting somewhere now.
No I was merely demonstrating that I can throw in almost entities in there and still get it to work properly. My exampleās heater is a do-nothing input_boolean and target_sensor is actually a sensor that reports memory usage. The point is, I got this working with random crap to prove thereās nothing wrong with your configuration.
What you need to confirm is that switch.officesswitch1 is spelled correctly and, when it is operated via the Lovelace UI, it actually turns the heater on/off. If the name is right and it controls the heater then thereās no reason the Generic Thermostat canāt also use it to control the heater.
Thanks for the help. I have checked the spelling etc. and there are no issues there. I have simply worked around this. As you say, using an input boolean works just fine. I simple used a declared an input boolean and then used an automation to switch the switch on/off based upon its value. Seems like a long way around the houses, but it works.
FYI. There are a number of other posts identifying exactly the same issue. Each time, somebody comes back with similar suggestions to those here. In many of those posts, I donāt see people coming back and saying āgreat it now worksā. I suspect there is an issue here somewhere and many of those people have just given up and done something similar to that which I have done. Maybe the switch.officeswitch1 value (which I cut and pasted from the entities tab) does not make the cut as an input boolean. I would be glad to examine debug logs, it you could point me to them.
Does it not strike you as odd that the automation you created can control the switch but Generic Thermostat cannot?
Generic Thermostat simply changes the state of the heater entity from off to on to off as needed. Both the switch and input_boolean entities have two states, on and off so they work equally well. This forum contains numerous examples of people successfully using Generic Thermostat to control a switch. You should be equally successful.
The fact that the switch can be controlled (via the automation) indicates it is indeed controllable and behaving normally.
The fact it cannot be controlled by Generic Thermostat implies there is a missing clue to this puzzle (or operator-error).
The Rube Goldberg arrangement you have implemented, although seemingly successful, only serves to mask the root cause.
If you are interested, I am available to continue with the investigation. On the other hand, if you are satisfied with the workaround/kludge (cannot in fairness be classified as a proper solution) then I guess weāve come to the end of the road.
My only tip is that you add initial_state: true to the kludge automation. Should it ever be accidentally turned off, upon startup that directive will force the automation to on. Itās important that it always remains on otherwise the Generic Thermostat will fail to control the heater.
Hi, just to document that the same issue happened for me with a tuya/xiaomi switch. Coudnāt get the Generic Thermostat to work when using the heater parameter, with my switch, but using an input boolean instead and linking to an automation worked.
I could never get generic thermostat to work with my set up either, which was (supposed to be) controlling a switch provided by esphome. Tried for ages, but it didnāt work once.
I decided it was rubbish and just moved to using an automation (that actually works better than the thermostat would have anyway) in the end.
Iām curious, are you not using generic thermostat at all? And if so, would you be so kind to share an example? Iām curious how you input your desired temperature. Thks
I donāt use any climate components at all. I use a template sensor to get the average current temperature of the house, I use a template sensor based on device trackers and known guests for occupancy and I use an input_boolean for ā30 minute boostā.
We also have a loft extension where the radiator is not as effective as weād like, so thereās an electric heater in there that switches on for 15 minutes every time the main heating switches on.
I actually found that if I kept the house at an average temperature between 16 and 19 everyoneās happy, and I also worked out that when the heating is switched off the temperature continues to rise another degree (well, about 0.8, but whoās counting) before the temperature starts dropping again, so I didnāt actually need to āset a desired temperatureā, I just have 16 and 18 degrees hard coded, but you could easily use an input_number for one or both.
I can post the automation itself later/tomorrow with a better explanation of how it all comes together if you need it.
I have played around with this and the issue seems to be that the Generic Thermostat can deal with an input_boolean. The temp input works find and it will set the boolean when the heat (or cool) needs to be turned on/off. However just changing that one parameter from input_boolean. to switch. makes it do nothing.
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.