I’m trying to figure out how to create an Accumulated energy sensor per hour. I know about the utility meter, however the meter only updates once per hour. What I want is something similar, but the sensor should update constantly and then reset at every full hour. I think I might need an statistics sensor, but I’m out of depth on this one. So I was hoping for some ideas
Background for the sensor is to use with new energy tariffs her in Norway where when we peak over thresholds (on a per hour basis) we get a more expensive tariff, and the idea with this sensor is to keep track of the current hour as it progresses to further utilize in some automations to cut of energy demanding components.
For others finding this thread, solution is as follows:
# the sensor
- platform: integration
name: energy_per_hour
unit_time: h
unit_prefix: k
source: sensor.strommaler_power # this is my power meter for the entire house
round: 3
...
# the utility
accumulated_energy_hourly:
source: sensor.energy_per_hour
cycle: hourly
So I let this sit for a few hours now and the results seems off? I’m comparing the energy dashboard towards the history of the accumulated_energy_hourly utility and as you can see its off by a few:
I completed the config’s and sensors/utility was online before 11:00 - so the measurements should be good hour to hour
So I let this sit for a few days, however something odd. It seems the energy dashboard is one hour behind (in regards to the utility)? Eg for hours 00:00->01:00 this get accounted at 01:00->02:00 in the energy dashboard? See pictures:
Otherwise the measurements seems to align pretty good (roughly the same between the utility and energy dashboard hour for hour, adjusting for the offset on the energy dashboard)