Don,t work this configuration

i receve the eroe mesage : This entity (‘light.light_1’) does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail. what are to do step by step to work propery?

modbus:

  • name: modbus_hub
    type: serial
    port: /dev/ttyS0
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: N
    stopbits: 1
    binary_sensors:
    • name: my_relay
      address: 0
      device_class: plug
      input_type: coil
      scan_interval: 15
      slave: 1
      slave_count: 15
      unique_id: my_relay
      lights:
    • name: “Light_1”
      address: 0
      write_type: coil
      slave: 1
    • name: “Light_2”
      address: 1
      write_type: coil
      slave: 1
    • name: “Light_3”
      address: 2
      write_type: coil
      slave: 1
    • name: “Light_4”
      address: 3
      write_type: coil
      slave: 1
    • name: “Light_5”
      address: 4

Hi, welcome. Please put the code you have between three backticks, because it is impossible to check it this way, let alone copy it and change what is needed. See point 11 in this post for that:

The unique_id message is not an error, so there’s nothing wrong. But if you do want to configure things through the UI, you need to add the unique id. Similar to how all the lights have settings like adress or slave, you add unique_id with a unique string that isn’t used elsewhere in HA. Once the new config is reloaded, you’ll be able to use the UI to change other properties for the lights.

To add to what Edwin said, look at this. But I agree, it will work properly, but some of the UI functions will not be available without the unique_id key included.
About "This entity does not have a unique ID, therefore its settings cannot be managed from the UI".