Recording a maximum value of perioid

Hi,

A while ago I installed ESPhome temperature sensors in my AC intake and output. Then I have a template which calculates difference between those sensors and creates difference value. This value is usually between 9.5-10 Celsius.

This week my wife said that ac keep running but house is hot as $shit, so I checked the ac difference and it was 6.5C. I called ac-dude and they found the problem and fixed it. I checked my ac difference history and saw that there was a trend where max difference has been decreasing over two weeks. It was difficult to see because data is unfiltered.

So I started to think that maybe I could start to record max difference from each cooling cycle (I know when cooling cycle is running because my my ac controller give state equipment_running: compCool1,fan. It could be equipment_running: fan and then ac difference is usually couple of Celcius so I don’t care about this). So ideally I would have graph in HA which shows each cooling cycle, length of it and maximum difference for each cycles. If ac is not running value is 0 and if it runs 20min and max difference is 10.3C, it shows value 10.3 whole 20 minutes.

Is this something what I should start to build in templates or what is the optimal approach for this problem.

Thanks,
Mika


Looking at the graph, the difference seems like it usually keeps increasing until right up to when the blower kicks off… how’s it supposed to know the max at the start of the cycle?

Well I was thinking that the analysis is done after each cycle. When cooling cycle starts, it starts to record the max value, if it is after 2 min then it is the max value and remains as max value until the end of cycle. When cycle ends, it records that between 8:00 and 8:20 max was 10.3

I’m also interested in this - some way of creating a graph of a max value that occurred in a day - over time - say 2 months. In my case I want to monitor the max discharge temperature on my heat pump that occurred in a 24 hour day - and graph that - and have that info for say the last 30 days…