hidaba / PylontechMonitoring

Adding WiFi monitoring to US2000B , US2000C , US5000 batteries.
18 stars 8 forks source link

Energy dashboard in home assistant #3

Open KoenAclinic opened 4 months ago

KoenAclinic commented 4 months ago

The powerin and powerout variables are only for real time watts (every second) so for the realttime dashboard (power flow card plus in hacs) it is working perfectly however if you add these to the energy dashboard it doesn't work. Values are complete bogus. I cannot track daily usage in and out the battery, now only live feed is working.

Powerin and powerout are values in watt seconds I guess not in Wh or kWh that is necessary in the energy dashboard. There are no variables for powerin_kwh and powerout_kwh in your code

What I need to do in home assistant with the powerin and powerout variable so that it measures kwh in the energy dashboard and not realttime watts?

How to fix this? Or can you explain what is going on?

KoenAclinic commented 3 months ago

i found a solution

1) integration sensor

sensor:

2) utility sensor

utility_meter: energy_in_hourly: source: sensor.energy_in_raw cycle: hourly

energy_out_hourly: source: sensor.energy_out_raw cycle: hourly

3) template sensor

template:

add template sensors to battery in energy dashboard

hidaba commented 2 months ago

Hi @KoenAclinic , Thanks I'll put in my homeassistant