Apostrophes and underscores

This probably outside the mobile app really but got a new phone and would like to name it John’s Phone in the app and have all my entities show as johns_phone as well as the notify service end with johns_phone.

It keeps coming in as john_s_phone. While I can rename the entities, I can’t rename the service (that I know of).

This also happens for other devices, like Zwave, when I want to name a light billy’s room light and have it stored as billys_room_light.

I’ve seen posts on this before but is there a way to make HA, as a whole, replace apostrophes with nothing?

change the device name i companion app settings and it should update teh service call

Thanks. You are right, that is an option.

  1. Force stop the android app
  2. Delete the phone from the Mobile integration
  3. Name the device via the app to Johns Phone
  4. Start the app
  5. A new device is added under the Mobile integration named Johns Phone along with sensors and the service as johns_phone
  6. Rename the device from the integration itself if desired
  7. Go into the device and rename it with the ’ but don’t let it update the entities

This just isn’t the most intuitive way. Naming the device via the app as possessive makes more sense to me at least.

Is there a good use case where replacing an ’ with an _ makes more sense then just removing the ’ ?

ths was unneccessary.

Settings > Companion app > Select your server > Change device name

will rename it on the fly

i think that is part of slugify which HA core uses

1 Like