Open KoenAclinic opened 4 months ago
i found a solution
1) integration sensor
sensor:
platform: integration source: sensor.power_in name: energy_in_raw unit_prefix: k round: 2 method: trapezoidal max_sub_interval: minutes: 5
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:
sensor:
name: "Energy In Hourly" unit_of_measurement: "kWh" state: "{{ states('sensor.energy_in_hourly') }}" attributes: device_class: energy state_class: total_increasing
add template sensors to battery in energy dashboard
Hi @KoenAclinic , Thanks I'll put in my homeassistant
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?