How to change a switch's entity name? (switch from zwave)

I want to change the Entity Name of the “switch” that is generated by the zwave switch. So in the screen shots there is the “zwave.switch_3” and then there’s the “switch.switch_2”. I’m not exactly how HA creates the zwave device then associated switch device at setup, however I want to change the “switch.switch_2” entity name to “switch.switch_3” (i.e. with a 3 not 2).

Goal:

  • I have a Zwave switch I’ve physically labelled “Switch 3” (so would like to stick with this name)
  • I changed the zwave entity names to “switch 3” as you can see in zwave.switch_3, however
  • I’m not sure how to change the “switch.switch_2” entity name to “switch.switch_3” to line everything up??? (i.e. this is the question)

Another Reason:

  • In my appdaemon apps the way I reference the current state and power consumption from the switch from my testing is via the switch entity name (c.f. zwave entity entity name), so my code looks like the below. So I’d really like to solve the question above so I can reference it as “switch.switch_3” and not “switch.switch_2”

    self.get_state("switch.switch_2", "power_consumption"))

Image Snapshots from Home Assistant:

You can change these in the ‘entity_registry.yaml’ file in the config folder.

It’s covered in the documentation :wink:

You rename the zwave. entity with Rename Node and the switch. entity with the new Entity Registry (which means you can click on the entity in Overview, click the cog, and rename it live).

@Tinkerer - thanks - got it

(I’ll have to readup to understand how these different devices seem to get created for the zwave switch too…with same node_id e.g. “zwave.switch_3”, “switch.switch_3”,
“sensor.aeotec_dsc06106_smart_energy_switch_previous_reading_4”, etc… )