Yesterday I found out that my current clamps of the Shelly3EM were installed wrong, and I reversed them. That led to some other changes, especially the value of the total harvasted kWh.
- platform: template
sensors:
shelly_pv_harvest_energy:
friendly_name: "PV Ertrag Gesamt"
device_class: energy
unit_of_measurement: "kWh"
value_template: "{{ ((states('sensor.3em_pv_channel_a_energy')|float + states('sensor.3em_pv_channel_b_energy')|float + states('sensor.3em_pv_channel_c_energy')|float))|round(2) }}"
availability_template: "{{ not ( is_state('sensor.3em_pv_channel_a_energy', 'unavailable') or is_state('sensor.3em_pv_channel_b_energy', 'unavailable') or is_state('sensor.3em_pv_channel_c_energy', 'unavailable') ) }}"
In this sensor all 3 states had to be changed from states('sensor.3em_pv_channel_a_energy_returned) to states('sensor.3em_pv_channel_a_energy).
The sensor had a value of 9.993,3 before = total kWh harvested. After the change it was ZERO of course.
This lead to this stupidly wrong statistics:
I tried going to developer tools → statistics, find the sensor.pv_erstrag_[daily, monthly, yearly] and delete the wrong value at Jan-15th 13:35, and set it to the correct value.
But it stills shows that way:
Daily is correct now of course, but I can wait one year for the yearly one to be correct again:
Who can help my solve this issues please?