I could use some help as I am not too familiar with the logic and configurations of Home Assistant yet. I’ve got an integration which receives an energy measurement every once in a while. I’ve got to look at the code to see how often in changes. It is in unit_of_measurement: kWh
. I would like to represent that in the energy dashboard. I understand that I can create a custom sensor or modify the existing one to include total_increasing
.
However, the measurements collected are basically an average or aggregate calculated by the service for a period of time. So at 1PM it returns 0kWh, 1:30PM returns .55kWh, then 2:00PM returns .40kWh, and finally at 2:30PM it returns 0kWh.
What I would like to do is sum all the values that are returned. So taking the above example the sum would be as follows:
1:00PM - 0
1:30PM - .55
2:00PM - .95
2:30PM - .95
Is this achievable? An assumption is that only when the value returned by the service has changed will HA records a new data point. So if 1:30PM and 1:45PM return .55 kWh, HA is not updated. Only when at 2:00PM the value changes to .40kWh a new data point is recorded.