kWh Sensor based on Watts

I’m able to create a sensor of kWh based on a watt sensor using:

sensor:
  - platform: integration
    name: "Back Heater [kWh]"
    source: sensor.back_heater_w
    unit_prefix: k
    method: left

I can’t configure this to have an area or icon. When I click settings I get the message:

This entity (‘sensor.back_heater_kwh’) does not have a unique ID, therefore its settings cannot be managed from the UI.

I can’t set unique_id or entity_id on the sensor in the yaml or it won’t validate. I tried digging through the code here:

Any ideas how to set a unique ID for a sensor under the platform “integration”? It’s a really difficult term to search for.

Some integrations do not support a unique id. For these please use Customize:

You can set an icon, but not an area.