Tuya switch to light override?

I have a Tuya/Smartlife switch that I’d like to show as a light. Can you do something similar to the override like the SonoffLAN addon?

  username: email
  password: abcd
  reload: always  # update device list every time HA starts
      device_class: light
      name: Bar Lights

Use a template light

1 Like

Template Lights are the perfect way to go. But if you’re just quickly redefining some switches, you can also use something like:


  # Pseudo-lights that are actually switches
  - platform: switch
    name: Bettlampe
    entity_id: switch.switch3
  - platform: switch
    name: "Bettlampe klein"
    entity_id: switch.switch5

Did not know that one :slight_smile:

Is there a way to add an icon_template to this to the simple light: entry to get an MDI icon of choice too?

The light.switch platform doesn’t currently support icon_template, see Light Switch and Customizing Entities in the docs.

You can, however, use icon: in the customize: section of your YAML or in the Lovelace UI to change the icon. Per default it uses hass:lightbulb (and the theme’s colours to show on/off states).

Note: Apparently the auto-gen UI will inherit the switch icon for the new light switch while the new Lovelace UI won’t.