Energy - This entity ... does not have a unique ID

I have a Sonoff S31 that I configured with ESPHome. It was done a long time ago. Everything works and it shows me the energy information.

I created a device that I can see and add to the Energy section.

  - platform: integration
    source: sensor.ring_doorbell_s31_power
    name: 'S31 Ring Doorbell Power'
    unit_prefix: k
    round: 2

When I try to go to Settings of this sensor, I receive the following message:
image

I do not see a way to add the “unique ID” to the sensor. Any ideas on how to do this?

2 Likes

I‘m interested as well, have the same problem.

sensor:
  - platform: integration
    source: sensor.espressomachine_power
    name: espressomachine_energy
    unit_prefix: k
    round: 2