Energy dashboard not populating

I have:

image

But I get and empty graph. What am I missing?

The state_class should be total or total_increasing.

It’s an esphome sensor. I can only select “total_increasing” there.

If I remember correctly I deliberately added measurement to avoid the warning "this device is increasing but not strictly increasing stuff (don’t know the exact words). It is resetted every day so not strictly increasing…

Edit: eventhough I changed it in esphome and reloaded the integration in HA it stays measurement :man_shrugging:

Edit2: nevermind. I had changed that in customize

So now I have the info in the energy dashboard I have the next problem… Why is this downward spike every day:

You need to use total_increasing.

The sensor’s value may reset to 0, and its value can only increase: state class total_increasing.

https://developers.home-assistant.io/docs/core/entity/sensor/#how-to-choose-state_class-and-last_reset

1 Like

Hi Tom, initially I just gave up. But now I am seeing these spikes again every day I wonder how I can get my energy dashboard functional again.

This is the behavior:

This is the device used:

This happens when the solar converter starts up every morning:

This I tried in the esphome sensor:

    energy_production_day:
      name: "${esp_name} - Today Gen"
      state_class: total
      #state_class: total_increasing # was empty
      # https://developers.home-assistant.io/docs/core/entity/sensor/#how-to-choose-state_class-and-last_reset

both state_class total and increasing both do not get the spikes away (tried a few days).

Is there any other thing to try?

edit:
this is my customize yaml:

sensor.growattmodbus_today_gen:
  #last_reset: '1970-01-01T00:00:00+00:00'
  #state_class: total_increasing
  state_class: total
  device_class: energy

Those spikes after the reset are causing your issue. Why are they occurring?

Cause the inverter is starting up. That only happens if there is “enough” light. And in the beginning there are some points of “just enough” (or not) light.

This is normal behaviour for an intverter.

This is not normal behaviour for an inverter. The integration needs to be fixed or the inverter settings need to be changed.

e.g. SMA inverter:

It is though. An inverter starts with light… and in the shade it sometimes starts but then stops and starts again. Same at the end of the day, it stops and starts a few times.
The pv panels just so not give enough to start and remain started.

Ik have at least 2 friends with other pv inverters (solis and solaredge) who have exactly this startup behavior.

Nevertheless, is there an option to keep the energy dashboard clean with this behavior?

Why is the inverter reporting yesterdays full energy total during these times it starts up intermittently?

Once it resets to 0 it can go on and off all it likes but it should still be reporting 0, or a very small amount at least. Not yesterdays total.

Nope. Garbage data in → garbage data out.

I suppose you could filter it with a template sensor but I’m not sure how.

Where to start to ask to “change this” in the esphome section for growatt modbus?

I used to use the custom component but now I use this code I need to aks the maintainer?

Same problem with and inverter:

Now I will try to reset the value to 0 every night in esp

time:
  - platform: homeassistant
    id: homeassistant_time
    on_time:
      # Every morning on weekdays reset ID todaygen
      - seconds: 0
        minutes: 30
        hours: 1
        days_of_week: MON-SUN
        then:
          - lambda: id(todaygen).publish_state(0);

This did not work. the inverter spits out bogus data in the startup phase. Alternately 0 and previous day gen until the inverter is completely running at 50Hz…

Ok so now I have another problem… the “spikes” are gone:

But I keep getting “spikes” in the energy dashboard. Now I also reset the value of the daily gen on 0:00 to 0 it shows me a negative spike:

What can I do to repair this?

Any help available here? Issue still persistent :unamused:

Hi Tom,

I tried your 2 tips:

  1. the integration needs to be fixed:
    I asked for help here:
    Spikes with integration growatt_solar · Issue #3965 · esphome/issues · GitHub

  2. inverters settings need to be changed:
    I contacted Growatt but I get no reply.

Can you help me on the way please? Is there a way to “filter out” via esphome the startup values?

Most likely in your sensor setup for esphome.