Hi,
I have a problem with a utility meter sensor. I have a sensor which tracks the total electric energy consumption. This sensor is setup with “device_class: energy” and “state_class: total_increasing”. Based on this sensor, I setup a utility meter to track my daily electric energy consumption. This is defined as follows:
The problem now is, that the utility meter values are wrong. Last night at 0:00 am the sensor tracking my total consumption was at 285.98 kWh. Now, while I’m writing this post, the sensor shows a value of 311.42 kWh. However, the daily sensor which resets at 0:00 am currently shows a daily consumption of 21.58 kWh. How can this be? Isn’t it supposed to be 311.42 kWh - 285.98 kWh = 25.44 kWh?
To make things even more strange: I used the exact same total energy consumpion sensor for the Energy dashboard. And there the calculation is correct!
Edit. I think I found the problem, it’s in counting sensor.energy_used. There are 3 different values and sometimes this sensor are decreasing. I added in template:
- trigger:
- platform: state
entity_id:
- sensor.total_yield
- platform: state
entity_id: sensor.sun2000_8ktl_m0
attribute: grid_accumulated_energy
I have a similar Problem.
My sensor for the total energy consumption of the heatpump is ‘sensor.energymeter_waermepumpe_base’.
At 0:00 am it was 6401,66 kWh
At 8:00 pm it was 6414,23 kWh
So the difference is 12,57 kWh
I have the same problem. Any solution to this?
Just as for you @ffm777 , the calculation in the energy dashboard is correct, my understanding is that it might have to do with that the energy dashboard is using LTS data while the utility meter is using the actual sensor source value, but not sure…
Still don’t explain why the utility meter is wrong though…
Solved: Problem was that my energy meter went unavailable every 5th minute due to a poor connection. Fixing the connection problem also fixed the utility meter.