Hi, my thermostats (Synopé TH1123ZB) can vary their output to the baseboards using duty cycles (off, 25%, 50%, 75% and full on). The thermostat Lovelace object only shows ‘Idle’ or ‘Heating’. Is there a way to have them show the percentage of power being sent to the baseboards instead?
Thanks, but I’m not seeing the duty cycle being displayed in the card. For example, this is what the Neviweb app looks like on my phone. The red thermostat is 1/4 filled so that baseboard is putting out 25% of its power to maintain that 21C that the thermostat is set to.
This is what I would like to see if there is a way to display.
Is it possible that what you refer to as ‘duty cycle’ is what Claude calls ‘heat level’? His GitHub repo provides an example of how to display the ‘heat level’ attribute as an icon (using Custom UI).
I coded a duty cycle sensor for a bang/bang heater control I made for a dehydrator. You need access to the times when the current and previous 2 state changes occurred. Let us call the time for the current state, t0, time for the previous state, t1, and the state before that t2.
If the current state is ON:
DC = (t1 - t2) / (t0 - t2)
Else:
DC = (t0 - t1) / (t0 - t2)
Dig? This was easy peasy with arduino+bare metal. However when it comes to HA, I have a feeling getting t2 is going to require some less common tricks to store that ‘previous-previous’ state. I’m familiar with how this is done in node-red, but I’m useless when it comes to yaml automations. My best node-red free take on this would be using a database sensor, lol!
Thanks! Got the ‘heat level’ icons to replace the thermostat icon on my floor plans. Do you know how to integrate them to the thermostat card or simple thermostat card? I have a “bird’s eye view” of all my thermostats (9) from where I can see the temperature they are set to as well as ambient temperature. Seeing the ‘heat level’ there would be a plus.
In Claude’s example, the template controls entity_picture. I have a single thermostat (for a forced-air furnace plus AC) and to show what it is doing, the template controls icon and icon_color.
climate.thermostat:
templates:
icon: >
if (state === "off") return "mdi:power-off";
if (attributes.hvac_action === "heating") return "mdi:fire";
if (attributes.hvac_action === "cooling") return "mdi:snowflake";
if (attributes.hvac_action === "auto") return "mdi:autorenew";
if (attributes.hvac_action === "idle") return "mdi:sleep";
return "mdi:power-off";
icon_color: >
if (attributes.hvac_action === "off") return "gray";
if (attributes.hvac_action === "heating") return "red";
if (attributes.hvac_action === "cooling") return "blue";
if (attributes.hvac_action === "auto") return "green";
if (attributes.hvac_action === "idle") return "black";
return "gray";
Here it is showing the mdi:sleep icon when the hvac_action attribute is idle.