Change entity light to switch

hello guys,

i need help in my configuration, i have read many page and videos (Cambiar el dominio de la entidad | de SWITCH a LIGHT - YouTube) to change entities, but in my configuration it doesn’t work.

in /config/configuration.yaml i’m put switch: !include switchs.yaml, in this file put:

#change light to swith
switch:
  - platform: light
    name: "Switch terrace"
    entity_id: light.switch_tuya_terrace_light

  - platform: switch
    name: My Grouped Lights
    entities:
    - switch.switch_tuya_terrace_light

thanks!!!

You have this in your configuration file:

switch: !include switchs.yaml

The include line means that where the line is the content will be placed.
Putting that content in the configuration.yaml would make it look like this.


switch:
  #change light to swith
  switch:
    - platform: light
      name: "Switch terrace"
      entity_id: light.switch_tuya_terrace_light

    - platform: switch
      name: My Grouped Lights
      entities:
      - switch.switch_tuya_terrace_light

As you can see in the start you will end up with a double switch line.
You can remove the switch: in the configuration.yaml or in the switchs.yaml.

If you are splitting up your configuration, then I suggest you watch this video to get some ideas.

This seems redundant. Turning a switch into a switch?

If you just want to rename it you can do that via the UI or Customize.