Proposal: Add a random 4-digit number to all "selector" to avoid collisions

Hello everyone,

Small proposal, I know that sometimes there are collisions with selectors when creating a device in an integration that has the same name as a device in another integration.

I propose adding a 4-digit number at the end of each future selector (not those already created), to avoid collisions BUT keep a readable and « human-readable » selector :slight_smile:

Example:

  • Name: Bedroom temperature sensor
  • Selector: bedroom-temperature-sensor-1234

The selector is just as readable, but with fewer possible collisions.

For me, that makes sense, it’s the same issue as with stage names or dashboard names.

Agree with @lmilcent

Sorry @pierre-gilles I didn’t make the connection with the issue on GitHub :tired_face:

Thanks so much for your feedback :slight_smile:

Draft PR:

https://github.com/GladysAssistant/Gladys/pull/1336

(It’s still WIP, still a lot of testing to do)

I hadn’t understood until now what this was for.
And since I’m in that situation. I agree with your proposal.

This would allow dashboards to have the same name across multiple users.