The graphs can now be made with sensor cards, and ask it to do a line.
There is also a custom bar-card available.
Get the HACS installed, that will help you wth the custom cards.
your explanations are very detailed and I understood a lot with your examples.
Could you gave more information about the cards you’ve used for Energy use and the graphs with colors & night / day?
@fribse sorry for jumping into this old conversation. I’m trying to setup something like you were doing here, work out the kWh of multiple sensors that report real-time power consumption. My end goal is to track cost of the individual items.
I’ve got to the same point as you are here and I’m also getting W not kWh.
I’m tracking hourly, daily, weekly and monthly usage through utility meter for the individual sensors. What’s strange is the hourly, daily and monthly totals are showing W but weekly is correctly showing kWh.
Did you find out what was causing you to also get W reported?
I’ve actually put it aside for now, I have to redo it when I get the time (yeah one should think there were a lot of time at the moment, but noooo), but I get the daily summations from ESPHome. I would also like to push all the info to influxdb and grafana, but that’s next step after that.
I did the integration sensors like this (integration over time):
- platform: integration
source: sensor.pool_power
name: pool_energy
unit_time: h
Guess this is an Old topic but here is an update nonetheless.
I setup 3 x PZEM 004T for a 3 phase supply last week.
While the device reports instant power and accumulated usage, the latter is prone to issues as the value resets after even short power outages (which unfortunately i get plenty of)
The solution (s) i am currently testing uses:
A)
Use the Instant power (Watts) to populate sensors in HA
Use the Riemann sum integration sensor in HA to calculate the power (kWH) usage for 3 X kWH sensors
Use the utility meter component in HA to compute daily and monthly usage
B)
Once this was done, I setup influx and grafana for the graphing
C) I also setup a local openenergymonitor (OEM) server to test it as an alternate to B)
HA has a component called open emoncms_history that allows you to send sensor feeds to it
OEM also allows you to transform power (W) readings into accumulated kWH
I think I wil do away with B) entirely as C) seems better suited for the typical logging use cases for HA (power/ temperature etc)
Hi
Would love to have more info about you C setup. I presently have my data being stored in Infuxdb but haven figured out how to use Grafana at all. Am using the utility meter component to convert W into kWh. Seems to be working. Calculatons match bill.
Look forward to trying emoncrm. Where did you download the local server.
Is it possible to bulk load old data to utility meter?
I fear it´s a “from now on, start with zero” thing, but who knows…
Background:
Integrated utility meter months after starting with HA and due to some plug trouble (Shelly erasing their memory on firmware updates - how stupid is that…) I lost all my total consumption values since the beginning.
What do you guys do with single measurements?
Do you sum single measurements up to rooms or the whole house?
Currently I use it for single power plugs only. No aggregation at the moment. Curious to see what´s possible with all that numbers provided by this great utility meter. Wish I had integrated it right from the beginning (start with HA).
I’ve set up an aggregation sensor (thanks to @tom_l I got it working )
total_daily_power:
friendly_name: Samlet forbrug for i dag
unit_of_measurement: kWh
value_template: >
{{ expand('group.daily_power_usage')
| rejectattr('entity_id', 'eq', 'sensor.power')
| map(attribute='state')
| map('float') | sum | round(3) }}
device_class: power
That sums up the daily power. Just before midnight I store it in an input variable, so I can show ‘yesterdays’ powerusage.