wouter
(Wouter)
March 10, 2019, 8:33am
1
He Guys! I’m trying to use the Utility meter to show the total power usage. So i’d like to sum the daily_power_peak and the daily_power_offpeak. I create a template sensor but it doesn’t seem to work. The value is always 0. Anyone knows what i’m doing wrong?
- platform: template
sensors:
power_consumption_summed:
value_template: '{{ ((states.sensor.power_consumption_low | float) + (states.sensor.power_consumption_normal | float)) | round(4) }}'
friendly_name: 'Total power usage'
unit_of_measurement: 'kW'
Vishan07
(Vishan Baldew)
June 13, 2019, 2:26pm
2
Were you able to figure this out? I’m struggling with this as well.
I was able to sum them the way you did, but I would like to display the data in a graph as well.
That won’t work if you sum them. They need to be summed by the hour or something - any ideas?
wouter
(Wouter)
June 14, 2019, 9:21am
3
Hi Vishan!
Nope sorry. I couldn’t figure it out. It’s still on my to do list but haven’t found a solution yet. Let me know if you find something!
123
(Taras)
June 14, 2019, 11:31am
4
Try this version:
- platform: template
sensors:
power_consumption_summed:
value_template: "{{ ((states('sensor.power_consumption_low') | float) + (states('sensor.power_consumption_normal') | float)) | round(4) }}"
friendly_name: 'Total power usage'
unit_of_measurement: 'kW'
You may wish to consider using the History Statistics Sensor . I use it to report the total daily running time of my furnace.
wouter
(Wouter)
June 16, 2019, 6:32pm
5
Hi Taras! Thanks!! That works great! How would you use the History Statistics Sensor? I’ve added it under the utility_meter which and
utility_meter:
daily_power:
source: sensor.power_consumption_summed
cycle: daily
that seems to work really well!
Thanks again
1 Like
123
(Taras)
June 16, 2019, 11:39pm
6
wouter:
That works great!
Glad to hear it! You may wish to consider marking my post as the solution so other members can find it easily.
Good choice! Keep using that one. It it easier to set the cycle time compared to the History Statistics Sensor.