Energy - negative solar value on chart

Hi,
Should anyone know what might be behind this?
Energy tab starts PV production with negative value for the previous day…
Althought it is always seen as positive value…


thanks in advance.

You appear to be using a power sensor for your PV instead of the required energy sensor. The purple line in your graph is decreasing after midday. If this was en energy sensor it would keep climbing all day like the blue line.

its not decreasing, in the afternoon value of the sensor becomes “unavailable” as inverter turns off, here with proper scale, and should look this (red) 2021-12-22 15_32_01-Przegląd - Home Assistant
power consumption is increasing until restart in the morning hence there is a nice “saw-like” shape

> [sensor.energia_pv](http://192.168.100.92:8123/developer-tools/state#)
> 
> energia_pv 0.50 
unit_of_measurement: kWh 
friendly_name: energia_pv 
device_class: energy 
state_class: total

Ok that’s a lot clearer. unavailable or unknown states are ok but the state class needs to be total_increasing.

thanks, changed that although i think there was something wrong with it hence I changed to total…
and actually just checked it now has no state at all…

i’m reading this value for inverter web server…

  - platform: command_line 
    name: "energia_pv" 
    command: "curl http://192.168.100.79/home.cgi | sed -n 12p"
    unit_of_measurement: 'kWh'
    scan_interval: 20

maybe there is something to it ?
(screen was taken when inverter was working)

2021-12-23 00_51_38-Home — Mozilla Firefox

I’m not sure about the missing state, you will have to check you command line sensor.

Once you get it working I would however suggest you feed the PV energy sensor to a utility meter on a daily cycle. Then use this as your PV input to the energy dashboard. This will ensure it resets at midnight. You are currently not getting a new state until well into the next day which may be confusing the energy dashboard.

thanks i’ll try that.