New energy dashboard does not show solar power as measured by Shelly EM

Hi,

I have a Shelly EM with one clamp on the grid connection and one clamp on my solar inverter output. They work as expected in the “Electricity usage” graph, but not in the new “Power sources” graph:


The grid power is shown in blue, while the solar power is zero (see the small yellow segment on the axis around 10:00).
The “grid” clamp is configured as follows:

and the “solar” clamp is configured like so:

The Shelly integration proposes both “Energy” and “Energy returned” entities, but there is only a single “Power” entity (no “Power returned”) to choose from. I would expect “Power” to be negative (produced and not consumed) but it does not seem to be the case.

Any idea ?

Vincent

Additional info : from the Developer Tools statistics, I can see the Shelly does indeed output negative values as expected:


It seems the dashboard only expects positive power values.
Is there a way to tell the dashboard that it should take the opposite value of Power ?

Vincent

Hi Vincent,

I had to create a manual entity via the template integration, which turns the negative values from Shelly positiv (absolute). Since then the values turn up within the Energy Dashboard.

Best,

Wouter

template:
  - sensor:
      - name: "BKW positiv"
        unique_id: "BKW_positiv"
        unit_of_measurement: "W"
        state_class: "measurement"
        state: >
            {{ ( float(states('sensor.shelly_pm_mini_gen3_power'))) | float | abs }}

Hi Wouter,

That totally did it ! Thanks very much :slight_smile:

I still think HA should be able to handle a negative power for a “generator”, but your workaround works like a champ.

Thanks again,

Vincent

1 Like