Renaming and updating the selector

Hello,

Small « issue » when renaming scenes.
E.g.

  1. We create a scene Titi (we create a scene with selector titi)
  2. We change the title of the scene to Titi2 (the scene still has the selector titi)
  3. We want to create a scene Titi again → Error « A scene with the same name already exists. »

Would it be possible to update the selector or other fields (but that could have other impacts)?

Thanks,

Hi @Romuald_Pochet !

No — the idea of a selector is that it should be immutable, because it’s used in scenes, and possibly in scripts the user coded themselves.

However, I think the selector should contain a random part, so that for example:

« Titi » => selector « titi »

Becomes:

« Titi » => "selector « titi-123" »

Which would solve collision issues.

I had wanted to make this change at one point on devices because the issue also exists in the MQTT integration, but it was a massive amount of work and I had little feedback on this point so I set it aside.

1 Like

It’s true that I’ve already encountered this problem and I haven’t given any feedback about it!

I had a feeling it was impossible. Fortunately I master SQL.

1 Like