Energy distribution chart shows totally bogus values

Hi,

my energy distribution chart shows bogus values:

I also tried the Power Flow Card Plus which works just fine, after I inverted the solar power sensor.

But this one shows the actual current, while the other should show the daily energy?

This is my config:

Electricity grid

Grid connections

CALC SEN Netzbezug Energie (from grid)
CALC SEN Netzeinspeisung Energie (to grid)

Grid carbon footprint

Solar panels

EN SEN Solar Produced Energy (from solar)

Home battery storage

MQ SEN Akku EntladeEnergie (from battery)
MQ SEN Akku LadeEnergie (to battery)

and these are the sensors i use:

any idea why it doesn’t work as it should?

thanks

  • Installation method Home Assistant OS
  • Core 2026.4.3
  • Supervisor 2026.04.0
  • Operating System 17.2
  • Frontend 20260325.7
  • raspberry 5 4GB + NVME

I had to fix several issus:

  • I used wrong MQTT sensors for the battery. Now got it right i hope
    - name: "MQ SEN Akku LadeEnergie"
      unique_id: msa_battery_charge_energy
      state_topic: "homeassistant/sensor/MSA-280425440006/device/state"
      unit_of_measurement: "Wh"
      device_class: energy
      state_class: total_increasing
      value_template: >
        {{ (value_json.grid | selectattr('type','equalto','inv') | list | first).etin | round(0) }}

    - name: "MQ SEN Akku EntladeEnergie"
      unique_id: msa_battery_discharge_energy
      state_topic: "homeassistant/sensor/MSA-280425440006/device/state"
      unit_of_measurement: "Wh"
      device_class: energy
      state_class: total_increasing
      value_template: >
        {{ (value_json.grid | selectattr('type','equalto','inv') | list | first).etout | round(0)}}
  • had to fix the grid sensors, wrong unit
  - sensor:
      - name: "CALC SEN Netzbezug Energie"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: >
          {% set new = states('sensor.tasmota_emh_e_in') | float(999999) %}
          {% set old = this.state | float(0) %}
        
          {% if new == 999999 or new > 10000 %}
            {{ old }}
          {% else %}
            {% if new < old %}
              {{ old }}
            {% else %}
              {% if new > old + 2000 %}
                {{ old }}
              {% else %}
                {{ new }}
              {% endif %}
            {% endif %}
          {% endif %}