adaptive-lighting icon indicating copy to clipboard operation
adaptive-lighting copied to clipboard

Unable to remove old/removed light from AL

Open Stooovie opened this issue 2 years ago • 7 comments

If you remove a light entity from HA that was previously a part of Adaptive Lighting group, you can't remove it from the group, nor can you do any changes to the group (a "device" in HA implementation). Any change to the the group leads to User input malformed: light.[MISSING_ENTITY] is not a valid option for dictionary value @ data['lights']. You then have to delete the AL group/device and set it up again without the missing light entity.

Stooovie avatar Apr 22 '22 05:04 Stooovie

Same, subscribing

SamJongenelen avatar May 27 '22 19:05 SamJongenelen

Yep, been a thing for a while I've noticed.

peterbaker avatar May 27 '22 21:05 peterbaker

Same here, I have repaired my Zigbee lights and renamed entities and now I can't remove the old ones

Gitarcitano avatar Jul 03 '22 21:07 Gitarcitano

+1

kmplngj avatar Jul 05 '22 10:07 kmplngj

To workaround the issue I joined a spare light to the group with the old entity_id and removed it from the configuration. That saved me a lot of tweaking to the new configuration.

Most friendly solution (IMHO) would be to populate the dropdown with all entries already in the configuration regardless of them being present. Optionally they could be highlighted in red or something to attract attention.

mdehaas avatar Jul 07 '22 17:07 mdehaas

If you navigate to the integrations page, there is an "Adaptive Lighting" integration where it will list all groups. You can select the old ones and delete it from there.

quaint-engineer avatar Jul 27 '22 19:07 quaint-engineer

If you navigate to the integrations page, there is an "Adaptive Lighting" integration where it will list all groups. You can select the old ones and delete it from there.

The configuration page for the doesn't list the old groups if the entity is gone from HA, that's the crux of this issue. You can't save the configuration if an entity is no longer valid, but you can't remove the entity from the configuration because it doesn't show up to be unchecked.

peterbaker avatar Jul 27 '22 19:07 peterbaker

I left the following comment in #287 (since it seems to have received more attention): This is the same as https://github.com/basnijholt/adaptive-lighting/issues/278 (which gives a much better description), https://github.com/basnijholt/adaptive-lighting/issues/236, https://github.com/basnijholt/adaptive-lighting/issues/220 and seems to have started with 2021.11's dropdown list (see https://github.com/basnijholt/adaptive-lighting/issues/213), which is addressed in https://github.com/home-assistant/frontend/issues/10608 - unfortunately without any obvious reaction for almost one year. At least https://github.com/home-assistant/frontend/issues/10608#issuecomment-1114340713 pointed me to editing /config/.storage/core.config_entries.

peter--s avatar Oct 07 '22 23:10 peter--s

I've posted a PR to fix this issue.
https://github.com/basnijholt/adaptive-lighting/pull/350

danaues avatar Oct 28 '22 02:10 danaues

Closed by #350 thanks to @danaues :tada:

basnijholt avatar Oct 28 '22 03:10 basnijholt