I’ve been using default device names/entity names for all my motion detectors. I already have dozens of automations and scripts in place related to these motion detectors.
I just renamed the device names for each motion detector to make it easier to identify them. However, I was too scared to select “rename” the respective entity names when prompted with the question below:
If I were to rename the respective entities in the screenshot above, would this immediately break all my current scripts, automations, and Lovelace cards related to these entities… requiring me to change every single occurrence that mentions these entities?
If I choose to rename all the entity names in the screenshot above, is there an easy way to fix all my scripts, automations, and Lovelace cards, etc… still referring to all the old entity names? I’m guessing if there isn’t an easy way to do this, most people would simply choose to NOT rename entity names, only device names.
If I already renamed the device names, but didn’t rename respective entity names… but, later decide I want to rename the entity names to match the device names (and willing to change all my scripts, automations, cards, etc), what’s the easiest way to do that?
You can always open the files (configuration, automations and so on) in notepad and do a search and replace then reboot HA.
That way every instance of the names will be changed. Just be sure that you don’t have some very similar names that could cause issues
If you decide to rename the entities later then you could rename the device twice and take the option to rename the entities on the second time.
My advice would be to take the short term pain now to get nicely named entities. For each new device type that I have I get myself a naming standard. The usual suspects are the battery levels which I always rename to battery_level
Thanks. I’m not motivated to create additional work for me. I already spend WAY too much time keeping up with breaking changes in HA and respective integrations; which seem to happen regularly. For example, I haven’t migrated all my z-wave devices/entities to z-wave JS.