Hi, maybe this is very obvious to you guys, but how do I get the hourly consumption of electricity in my lovelace dashboard instead of getting a gradual increase sum. I see the “energy” dashboard already can obtain an hourly change.
see difference:
Hi, maybe this is very obvious to you guys, but how do I get the hourly consumption of electricity in my lovelace dashboard instead of getting a gradual increase sum. I see the “energy” dashboard already can obtain an hourly change.
see difference:
That is actually a good question
I just set up my Energy dashboard a few days ago, so someone more knowledgeable than me may come along, but I’m not seeing that data stored anywhere. It may just do a calculation that you can try to replicate: Every hour, compare the current total against a helper containing the last hour’s total and then save the current total into the helper.
So, first, update your hourly consumption however you want with something like the following:
{{ states('sensor.grid_consumption') | int(0) - states('input_number.last_hour_grid_consumption') | int(0) }}
Then, call the input number set service on input_number.last_hour_grid_consumption
with the value sensor.grid_consumption
.
Repeat this every hour.
Hope that makes sense, I didn’t feel like actually writing all the logic out