WTH do apostrophes get replaced with underscores in entity IDs?

We have a bunch of devices with apostophes in the names, e.g. “Aaron’s Bedside Lamp.” In HA, this translates to light.aaron_s_bedside_lamp, which isn’t very intuitive.

Yeah, I really wish Home Assistant would just remove apostrophes when generating entity IDs instead of replacing them with underscores. I’ve started removing apostophes from all my device names so I don’t have to keep thinking about it.

This isn’t something exclusive to HA - it’s a standard formatting process called slugify. Any software which converts strings to slugs will do exactly the same thing.

You can learn more about it here