Integration Solar inverter huawei 2000L

FYI

The Daily Solar Energy Yield , which is calculated by :
(daily_energy_yield + daily_battery_charge - daily_battery_discharge)
has decreasing values during the day.
So for the Energy Management Dashboard it isn’t an option. (state_class: total_increasing)

To have a working sensor I have used the Riemann Sum to calculate kWh from kW.
But you need to take the efficiency off the Inverter into account :
image

So I apply a correction to the input_power before feeding it into the Riemann

- name: "input_power_riemann"
  unique_id: "input_power_riemann_new"
  unit_of_measurement: "kW"
  device_class: power
  state_class: measurement
  state: >-
    {% set inpower = states('sensor.input_power')|float(0) %}
    {% if inpower < 1 %}
      {{ inpower * 0.90 }}
    {% elif inpower < 2 %}  
      {{ inpower * 0.95 }}
    {% else %}
      {{ inpower * 0.98 }}
    {% endif %}

After that I make the sum :

- platform: integration
  source: sensor.input_power_riemann
  name: solar_energy_riemann
  round: 3

The sensor solar_energy_riemann can then be used in the Energy Management Dashboard.

PS 1 : You can adopt the corrections to fit your installation, but for my installation its very accurate.
PS 2 : This efficiency graph is also the reason why in the morning the Daily Battery Discharge is higher then the Daily Energy Yield…

4 Likes