How to configure an integral sensor?

Hi,
I struggle with configuring an integral sensor to get energy (kWh) from my solar panels which only provides power value (W).
After searching and reading I created a sensors.yaml, added “sensor: !include sensors.yaml” to config.yaml.
sensors .yaml got the entry:

  • platform: integration
    source: sensor.solarleistung
    name: solar_energy
    unique_id: solar_energy
    method: left
    max_sub_interval: 00:01:00
    unit_prefix: k
    round: 2

Loading configurations works without any problems, but the entity ‘solar_energy’ does not appear.
Any idea why?

Btw: I know that integrals could be done with helpers, but I really dislike their principle of not offering yaml to see what’ inside while also not offering all parameters in edit-mode.
Uli

Have you tried a full HA restart & not just a reload?

I think the first time you set up any new platform, a full restart is required.

After restart:
{{ states(‘sensor.solar_energy’ ) }} → 0.0
Works:-)
Thanks
Uli

1 Like