I have three heat pumps, two controlled by Broadlink with the smartir component (awesome) and the one in the lounge has been added to my Harmony remote. While they all work well, they are Home Assistant unaware as HA does not know if they are actually on. This creates a problem is someone turns on/off the heat pump with the remote.
I’ve added a Sonoff POW R2 with Tasmota inline with the lounge heat pump and now want to change my template switch so that power more than 5w is on otherwise off. Not quite sure how to do that though. I have these two sensors and the code for the harmony based climate follows that. If anyone can point me in the right direction, that would be appreciated.
The teleperiod for the Sonoff POW must be set to the lowest value (10) for this to be useful. The default is 300 and I had it at 60.
The lounge temperature is being measured by a MiFlora plant sensor and only updating every 15 mins without retain. If HA is restarted, and the MiFlora is between ‘reads’, no value is presented to the generic thermostat and it will not work. I’ve now added retain to the lux readings for my two MiFlora sensors.
OK, not quite there yet. Now works if I turn it on and off with the template switch but if I turn it off with the remote, the template switch does not update.
I found this in another part of my config that works for my coffee machine so testing that now. Fingers crossed. Negates the need for the other binary sensor too.
Damn, still not working. Seems the power consumption changing has no affect on the template switch when invoked remotely. If I turn the heat pump on or off with the remote, HA is still unaware. If however I use the GUI, the state does report correctly (heating or off) when the power changes either above or below 10w.
Thanks, but I had this value_template: "{% if states('sensor.hvac_lounge_power') | float < 10 %}off{% else %}on{% endif %}" and neither that or yours works. Think it might have something to do with this? Generic thermostat - Home Assistant as my coffee machine one below works just fine [disregard the toggle code].
I had not added the switch.lounge_heat_pump to LL so I just did that and can confirm that the switch itself is actually working (using your value_template). It turns on and off as I use the remote but the thermostat itself does not update. So it seems it is an anomaly with the way the generic thermostat expects to see the switch behavior?
Seems I might be misunderstanding how the generic thermostat supposed to work? I don’t actually think it will ever behave the way I want it too (like a normal thermostat).
I think it’s designed for a dumb device like say a heated floor with a smart switch to turn the element on and off. When the floor temp is above or below the set level, it simply turns the switch on or off to energize the element. Might be wrong? I just don’t know now.
I thought that the power status (off or heating) would reflect my switch state based on the power consumption. While I can just use the template switch directly in LL, the thermostat card gave it more of a family friendly look and was consistent with the other two thermostats (Broadlink based) in the dashboard. Looks like I’ll switch to Broadlink with this one too.
Thank you so much for all your help and feedback though. Very much appreciated.
Your thermostat controls the heating based on the temperature you set by switching the the heat pump on and off. It gets feedback from the power monitoring switch to confirm that when switched off it really is off.
So if someone switches the heat pump off with the remote, the thermostat will see that the heat pump is off. It may then turn the heat pump back on, based on the temperature set points you have.