[solved] Impossible to affect an entity to a room

hello, i have created light in lights.yaml

# lampe virtuelle
  - platform: template
        friendly_name: "lampe salon"
          service: script.turn_on
          entity_id: script.turn_on_salon_virtual_light
          service: script.turn_off
          entity_id: script.turn_off_salon_virtual_light
          service: script.set_level_salon_virtual_light
            level: "{{ brightness | float / 255 * 100 }}"

now within paramter/entities
i could see the entity named “lampe salon”
but when i want to affect this entity to a room i get a message
“This entity (“light.sejour_virtual_light”) does not have a unique identifier, therefore its settings cannot be managed from the user interface.”

how could i solve this ?

You need to add the unique_id to the template light.
Just add

unique_id: lampe_salon_template_light

Then you can edit it in the ui and add it to a room.
Here are the docs where it is described

1 Like

ok thanks that will do the job