Renaming sub entities with main device rename error

This is the error when I click ‘yes’ to renaming ‘child’ entities when rename a device.

Invalid entity ID

If I have a - in the device name it throws this error but continues to rename the main device but none of the sub entities. i.e Lock - Garage. Furthermore, if I attempt to use a dash in the device name the first time renaming, it eliminates the opportunity for the functionality to ever work.

Also, if I leave the dash out it’ll rename all subs no error.

So don’t use dashes.

Figured I’d get a response like that, but didn’t think it’d be from a moderator.

Maybe it’s a way to keep everything organized. It obviously isn’t an issue naming the device with a dash so maybe you’d think it’s a bug…Thought I’d see if I was alone or there’s a solution (other than your obvious non attempt.)

Entity ids can only contain lower case letters, numbers and the underscore character _.

Names are less restrictive, though using dashes in names that are used to generate entity ids can cause issues.

Appreciate the clarification!

Also another thing to watch out for is entity ids that start with numbers. e.g. sensor.1234something they can be slightly more difficult to use in templates.

See: https://www.home-assistant.io/docs/configuration/templating/#some-more-things-to-keep-in-mind

How can I ‘reset’ any device modifications I’ve made? The devices that I’ve renamed and gotten the error above don’t respond to manual child device renames.

I’m fine with having to rename all of my devices if needed.