Can not figure out SMA sensors into energy dashboard

I cant figure out how to get the values from the SMA - integration into the ENERGY - dashboard.
For days now I have been googling my bun off and trying all I can think of. No luck. Not showing up in the list.

Basically, I can’t even figure out, what exactly needs to go into the three fields. I am assuming: the “live” data (now) is needed. I have sensors for current solar production, to grid and from grid. Those do not show up in the list the ENERGY-dashboard shows me.

My sensors are named:
sensor.sunny_boy_grid_power (solar production)
sensor.sunny_boy_metering_power_supplied (to grid)
sensor.sunny_boy_metering_power_absorbed (from grid)

The three sensors show ‘W’ and that seems to be the problem.

Tried this, but does not work. Was only thing I found that make sense to me.

“made” a new sensor:

- platform: integration
  source: sensor.sunny_boy_grid_power
  name: sma_dashboard_solar_power
  unit_prefix: k
  round: 2
  unique_id: 45152d31-818f-4c15-9dbc-718a8b59d487"

Did nothing for ENERGY and I found I should customize that, so I did.

  last_reset: "1970-01-01T00:00:00+00:00"
  device_class: energy  

Neither brought a change as far as the ENERGY - dashboard is concerned.

You want sensors that provide kWh for the energy dashboard.

This SMA integration??

You would be wanting to use total_yield or metering_total_yield or similar sensors.

Yes, that is the one I am using.

Unfortunately, none of my xxx_sunny_xxx sensors appears in the list! :frowning: when I want to add “solar production”.

I am an idiot!!! I was looking for the entity-id, but those do not get shown. After using the entity-name in the search, I got that sorted.

Now to figure out, how to get the “consumption” and “return” sorted!

1 Like

(These are not from the SMA integration… they just happen to be also from an SMA inverter.)

When you look in developer tools > states.
Have a look at your SMA sensors and check if any have the highlighted attributes.
That is what you need.

If you have kWh sensors without the device_class and state_class, you can use customize.yaml to adjust them manually in yaml. eg. add the device and state class.

If you don’t have kWh sensors you may have to make them with something like
Riemann sum

They need to end up with
device_class: energy
state_class: total increasing
UoM: kWh

Thank you very, very much HasQT. I think I got it now!!! Thank you for pointing me in the right direction!

This is looking VERY promising!!

Hey @RobertoCravallo, how do you fixed it?
I have the same issue.

Could you write in german please? :slight_smile:

hi @RobertoCravallo, i am interested how you managed to solve the sma energy converter data import. please explain!

1 Like

#metoo habe auch Interesse