How to get PV production in the energy dashboard

Hi,

I have a Solax X1 inverter with a pocketwifi dongle. I recently managed to flash the firmware on the dongle, so now I am able to get the readings directly from the inverter using the integration.

However, when I try to add the PV panels to the energy dashboard I get the error the entity has the state class ‘measurement’, but misses the ‘last_reset’ property.

Searching on the forum i resorted to makeing a template sensor, addint the ‘last_reset’ attribute. Antoher post suggested to make the state class ‘total’, so i ended up with this:

template:
  - sensor:
      - name: PV Opbrengst
        state: "{{ states('sensor.solax_swndy3fxkn_today_s_energy') }}"
        availability: "{{ states('sensor.solax_swndy3fxkn_today_s_energy') | float > 0 }}"
        unit_of_measurement: "kWh"
        state_class: total
        device_class: energy
        attributes:
          last_reset: "1970-01-01T00:00:00+00:00"

This sensor reflects the correct number and resets every day to zero (as the sensor on which it is based also does), and when I add this to the energy dashboard the error is no longer shown. However, on the energy dasboard it still shows the PV yield as zero.

I’m propably missing something simple here, but I would appreciate the help.

Then use this.

template:
  - sensor:
      - name: PV Opbrengst
        state: "{{ states('sensor.solax_swndy3fxkn_today_s_energy') }}"
        availability: "{{ states('sensor.solax_swndy3fxkn_today_s_energy') | is_number }}"
        unit_of_measurement: "kWh"
        state_class: total_increasing
        device_class: energy
1 Like

And don’t forget, it takes a while, before energy dash shows something :wink:

1 Like

Wauw, dat helpt! Nu werkt het. Zo simpel.

Bedankt!

1 Like

English only please. https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#zero-language-3

But you are welcome.

1 Like