Energy Dashboard Problems

I might have a related issue, maybe someone can assist me too?

As soon as my total energy returned for a given hour is higher than my energy consumption, the consumed energy is displayed as 0, even though it’s actually being consumed from solar power:

Even more, there is a negative consumed battery value (not sure if these issues relate, I’ve alreay opened a thread for that specific issue: Energy dashboard - untracked consumption showing up as battery consumed (negative))

As we can see, in generel, solar power produced is being recognized, and as long as I consume some power from grid (calculated from a Shelly 3EM), the bars are displayed in the upper graph.

My energy returned sensor is configured as follows (found somewhere in this forum I think, but not entirey sure):

# ---- Netz Total Power Returned ---- #
- sensor:
    - name: "Netz Total Power Returned"
      unit_of_measurement: W
      device_class: power
      state_class: measurement
      state: >
        {{ min(0,
            states('sensor.shelly_em3_channel_a_power')| float(0) +
            states('sensor.shelly_em3_channel_b_power')| float(0) +
            states('sensor.shelly_em3_channel_c_power')| float(0)
        )| abs}}
      availability: >
        {{
          [ states('sensor.shelly_em3_channel_a_power'),
            states('sensor.shelly_em3_channel_b_power'),
            states('sensor.shelly_em3_channel_c_power')
          ] | map('is_number') | min
        }}

Energy consumed:

# ---- Netz Total Power Consumed ---- #
- sensor:
    - name: "Netz Total Power Consumed"
      unit_of_measurement: W
      device_class: power
      state_class: measurement
      state: >
        {{ max(0,
            states('sensor.shelly_em3_channel_a_power')| float(0) +
            states('sensor.shelly_em3_channel_b_power')| float(0) +
            states('sensor.shelly_em3_channel_c_power')| float(0)
        )}}
      availability: >
        {{
          [ states('sensor.shelly_em3_channel_a_power'),
            states('sensor.shelly_em3_channel_b_power'),
            states('sensor.shelly_em3_channel_c_power')
          ] | map('is_number') | min
        }}

Since I do use 3 inverters and 2 batteries, the solar power consists of multiple sensors. I’m not sure if it makes sense to post it here, since it can clearly be seen, that solar power is being generated, but simply not displayed above.
Essentially, I’ve added the inverter, and one inverter channel as solar sources (directly connected to the home grid), and two extra sensors (one for each battery), that sum up the power generation as soon as the battery is full as solar power. Power, that is being drawn only from the battery (while no solar input power) is being displayed as power consumed from battery (you can see that it’s working for the night times).

Any advice on what I could check would be appreciated, I seem to have gone lost in some rabbit holes here…