I had a similar issue (I think). It has to do with the fact that your sensors reset on a daily basis. That causes some strange effects in the calculation, since the Energy dashboard uses sensors which only accumulate. I got around the issue with creating 2 utility meters and 2 sensors to convert to ‘kWh’ and use those in the dashboard.
configuration.yaml
homeassistant:
customize_glob:
sensor.*_power_yearly_kwh:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
sensor.*_power_yearly:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
utility_meter:
imported_power_yearly:
source: sensor.solaredge_imported_power
cycle: yearly
exported_power_yearly:
source: sensor.solaredge_exported_power
cycle: yearly
battery_power_yearly:
source: sensor.solaredge_storage_power
net_consumption: true
cycle: yearly
template:
sensor:
- name: "Imported Power Yearly kWh"
unique_id: imported_power_yearly_kwh
state_class: measurement
device_class: energy
unit_of_measurement: 'kWh'
state: "{{(states('sensor.imported_power_yearly') | float) / 1000}}"
- name: "Exported Power Yearly kWh"
unique_id: exported_power_yearly_kwh
state_class: measurement
device_class: energy
unit_of_measurement: 'kWh'
state: "{{(states('sensor.exported_power_yearly') | float) / 1000}}"
Now every thing looks good and the values seem pretty accurate…