Newly added switch is a light (lamp) but not swhowing as one

Searching but probably overthinking…

I have added a new switch that is connected to a lamp…

In customization I can only change device class to outlet or switch
I can change the icon but that does not make the lamp yellow when turned on…

Have searched the forum and goolgled but need some help how to change my switch into a working icon for a lightbulb…

image versus image


Ok, recnetly change…

state_color: true
mdi: lightbulb
did it

This is a nice WTH topic :slight_smile:

I’m pretty sure that only made it appear with a lightbulb icon on the front end. The component is still part of the switch domain (and not light domain) and likely is still switch.xxxxx and not light.xxxxx.

To make a switch into a light, you have a few options.

The most universal option is to use the Light Switch Integration, which makes a new entity (a light) that turns on and off the switch entity that you already have. Just replace all of your refrences to the switch with the one for the light (including Lovelace front end, which will solve your initial problem of how it’s displayed).

Depending on what integration the switch is from, you have other options. Such as if it’s MQTT you can just change it from an MQTT switch into an MQTT light. If it’s ESPHome, you can define the output as a light instead of a switch. Etc.

1 Like

Yes, understood. I don’t care (for now) if it stays a switch and is displayed as a lightbulb.

I said:

By the way, it is a qubino openzwave integrated switch which has a light connected…

Btw, thank you for your response.