Hi All, I have been driven nuts by GPT’s and Copilot recently trying to get my desired outcome so I thought I’d try the real brains trust.
Problem Statement:
I have a house with air conditioning and 5 zones, all of which I have integrated to be controlled from Home Assistant.
I can use the climate entities attribute temperature to set the desired temperature on each zone.
I also have temperature sensors in all the rooms in each zone (for the purpose of this example I am going to ignore the zones that have multiple temperature sensors in the same zone).
I want to construct a bar graph to show how far off the desired temperature the actual room temp is. Here is an example of what I want to see (note, all the desired temps in this image are set at 25oC)
Zones 1, 3 and 4 are below the desired temp and need to heat up.
Zone 2 is exactly perfect
Zone 5 is too hot
There are a couple of ways to do this. Would you have any need for the the actual difference values (above or below) in your automations?
If so, for each zone:
Define a template sensor that returns 0 or the positive difference between your current temperature and the set point. This is your above value.
Define a template sensor that returns 0 or the negative difference between your current temperature and the set point. This is your below value.
Then it is simply a matter of plotting the above, below and current sensors as series in an apexcharts stacked column chart. Set the colours for each series appropriately.
If you don’t need the above or below values then it can still be done in apexcharts but you have to define a transformation using JavaScript for the above and below series.
I do have a use for the difference, and have used it in the past (learned the value of periodic testing of backups over the weekend, so I am bringing everything back from scratch). I will use the difference in my automatons going forward.
I was going to use a single sensor with either +'ve or -'ve values to tell the system whet the outcome should be, but i am willing to entertain the two separate sensors.
I’ve had a shot at getting each of the zones into a separate bars in Apex, however that’s been a real struggle. For what ever reason the only way I have been able to get data on the graphs is with time on the x-axis rather than zones.
Yeah, I’ve had a go with bar-chart and having them separately, but for the life of me I can’t find a way to put all the bars on the same graph. I’m quite amazed that there’s not much out there around it.
I’ll take a closer look at that link you put in your last post, but at first glance most of those graphs are over periods of time, not current state.