Hi All,
This has only been running a little over 24 hours & and seeing so teething isssues.
I’m getting some strange read readings on my Solar Production statistics,
Typically numbers that are a multiple of about 21,677.63 kWh.
That number or it’s multiple would be coming from either my template or the Integration of the values.
First, where it comes from.
I have a Hybrid Inverter in with Eastron Meters on both the Mains Supply Input and the Load Output.
The input meter’s total today reads 70,727.80 kWh
The output meter’s total reads 49,049.98 kWh
Subtracting them gives me a Net total of my all time Solar Production; as in the Number above.
This is my Template which did have an error in the availability that I have now maybe fixed.
#Test Alternate Code
template:
- sensor:
- name: "Inverter_Production"
unique_id: "inverter_net_prod_test"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
state: >
{{ states ('sensor.sdm220m_3_import_active_energy') | float(2) | round(2)
- states ('sensor.sdm220m_2_import_active_energy') | float(2) | round(2)}}
availability: >
{{ states ('sensor.sdm220m_3_import_active_energy') | float(none) != none and
states ('sensor.sdm220m_2_import_active_energy') | float(none) != none }}
The error I changed, was paste related in the availability & this:-
availability: >
{{ states ('sensor.sdm220m_3_power') | float(none) != none and
states ('sensor.sdm220m_2_power') | float(none) != none }}
Am yet to prove that it is fixed; needs to run overnight for that to prove it’s self.
The other thing that I want to question is the state.class: total_increasing
While fundamentaly I know this is considered correct, does the integration take into account that my “Increasing Total” can actually Decrease during certain periods?
This situation exists for one specific reason; the inverter consumes a bit around 60 to 75W to maintain it’s self. So in the dead of the night, a neat 1000W load would require an input of say 1075W.
So for say 12 hours of zero PV panel input, the Net production from the template would reduce by 0.9kWh.
Would this be a problem with the coding behind the Energy page that does the Integration of the values?
On one had I can see that it might not be, as there’s still an area under the curve, but my maths is getting a bit rusty on this.
Any thoughts?