I have created a couple of custom switches and they show up like this on the dashboard:
Is it possible somehow to make the switch icon show up like this so that the lightning icon shows up as a switch icon?
Thank you in advance!
I have created a couple of custom switches and they show up like this on the dashboard:
Is it possible somehow to make the switch icon show up like this so that the lightning icon shows up as a switch icon?
Thank you in advance!
Have you edited the device and tried changing the name? More Info → Cog Icon. Or you can go into the device itself and edit the entity. If you didn’t provide a name for your custom switch then it will inherit it’s entity name.
Well maybe I was not clear enough: There is no device available, it’s only the entity itself as it is being created like this:
# "Template Switch" integration (for creating custom switches):
switch:
# GUDE EPC 8211 port 06:
- platform: template
switches:
gude_epc_8211_port06:
turn_on:
service: shell_command.gude_epc_8211_port06_poweron
turn_off:
service: shell_command.gude_epc_8211_port06_poweroff
# "Template Switch" integration (for creating custom switches):
switch:
# GUDE EPC 8211 port 06:
- platform: template
switches:
gude_epc_8211_port06:
friendly_name: "My Switch"
unique_id: a5ff5524-4bcf-40af-be8c-242c5f9621fc
turn_on:
service: shell_command.gude_epc_8211_port06_poweron
turn_off:
service: shell_command.gude_epc_8211_port06_poweroff
Just make sure every switch you create has a different unique ID, this is easy if you use the Studio Code Server because you can right click and generate a new UUID each time.
Hmm…I just don’t get it why HA needs an unique ID just for showing up as a toggle switch instead of a lightning bolt.
Nevertheless I found also this solution as a workaround:
Calling scripts instead of using custom switches makes more sense to me.
@CO_4X4 Thanks anyway for your help mate, very appreciated!