Struggling with naming conventions

I’m new to Home Assistant and recently began moving from HomeSeer to Home Assistant. I have a HA Green and removed two switches from my HomeSeer system, did a factory reset on each, and brought them into HA via the Z-Wave integration. I was creating a new dashboard and following a video Create Beautiful Home Assistant Dashboards Easily! and at the point where we were creating a badge that would count the number of lights on in different areas. The process involved creating a helper with a sensor where a template is used. I cut and pasted the template and one of the lines looks like: {% set DOMAIN = ‘light’ %}. After completing the example everything was good, but I didn’t see one of the lights (connected to one of the two switches). When I starting troubleshooting I noticed that each switch had a different domain in the Entity ID. One is switch.basement_stair_light and the other is light.media_accent_lights. My first question is why is one a switch and the other a light? Also, I have a Device called Basement Stair Light (which was originally named Basement Stair Switch), but no device for the media accent lights.
The Basement Stair Light physical switch is a HS-WS200+
The physical switch for the media accent lights is a HS-WX300

I’m trying to get consistent in my naming convention but don’t know how these two physical switches ended up being different e.g. one a switch and one a light. Was this a result of a blunder I made with “creating” these in HA?

I’m trying to determine the best way to clean up the mess I created. Maybe delete everything related to these two switches and try again. (I would need to figure out how to do that.) Is there a better way?

The only way I know of to have a switch show up as a light.your_switch_as_a_light is in the switch settings using the ‘Show as’ option. This creates the light entity and hides the original switch (still shows in Device settings and can be used, just hidden from auto generated dashboards).

Maybe check each of these switches device pages to see if you have the light entity and check the switches settings.

In addition to the name you can also just change the entity names to match (or be similar as there are no caps and paces are prleaced with underlines etc.). The naming convention I use is:

Location - Brand & Model - What it is For

For example:

Powder Room Shelly Plus 1 Light Switch

There’s never any confusion and I can search by room, by brand, by what it is etc. etc… It’ll take a little while but you’ll get there, don’t worry.

By “Show as” are you referring to the “Friendly Name”? I can’t find a “show as” option anywhere.

Generally if the device presents dimming functionality, Home Assistant will create the entity as a light, but if the device only has on/off controls it will create the entity as a switch. Some Z-wave devices support changing from one type to another during installation.

If a light was created but you wanted a switch, you’ll likely have to do something in Z-wave and re-interview. If you got a switch and wanted a light you can create a helper in Settings > Devices and Services > Helpers and Create new button selecting “Change device type of a switch”. Note that this won’t give dimming, just change the domain for convenience. It will hide the original switch entity by default.

I’m still in the early stages of learning HA, but I will give this Helper approach a shot. I’ve got so much to take in I keep bounding all over the place. Thanks.

It takes a while coming from HomeSeer.

1 Like

Third item down in the switch settings…

1 Like


I don’t seem to have that option. Should I be looking somewhere else?

What are you clicking on to get that? There’s not even an entity_id in that pic.

In your screenshot you should be clicking on ‘Master Light Switch’ in the ‘Controls’ section, then clicking on the cog in the upper right hand corner to open up its settings.

1 Like

Finally, was able to navigate to the correct location to make the change that HappyCadaver recommended and it work! Thank you all for your patience with me and helping me to learn. Frustration turned to joy!

1 Like