Clean way to migrate Groups from YAML to UI

Hey folks,

A bit of advice needed, I’ve just upgraded from 2021.12 to 2022.05 and looking at migrating all my YAML groups into the UI-Helpers. One requirement would be to keep the same entity name for the group so as to not break any automation, etc.

Using a test group with three lights I did the following:

  1. Deleted the YAML config
  2. Restarted
  3. Created the Group via Helpers, same name

Now I have the following situation:

  • The “old” YAML group light.studio_ceiling_lights is still existing in HA, in status Restored, and still linked to the automations (but useless, since there is no YAML anymore)
  • The new UI group has been created with the id light.studio_ceiling_lights_2 which is irking my OCD and also does obviously not work with the automations unless I update them all.

So question: why do YAML groups remain in config after being removed, and how can I do a seamless replacement without having to edit all my automations?

Hi, I did something similar to you (except for step 2 where you only need to reload Groups not restart) but I did not encounter any problems.

If you call up one of your old groups do you see a red “Remove Entity” in which case press this. If that works then you can rename your new entity to remove the “_2” from the entity_id.

1 Like

Thanks, that did solve it !