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

Referenced entities from deleted integrations are not cleaned up

Open mvdwetering opened this issue 3 years ago • 9 comments

Version information:

1.0.14

Description:

I removed the integration I was using for my lights and now use another one. I wanted to change the assigned lights that the adaptive-lighting integration uses. However the "lights" selection still shows the entitity of the integration I removed (using the UI of HA), but since it is not in the list I can not uncheck it and trying to save results in an error message "User input malformed".

Only way around it seems to be to delete the configuration and add a new one

mvdwetering avatar Nov 17 '21 17:11 mvdwetering

Think i'm running against this same issue

K-4U avatar Nov 21 '21 21:11 K-4U

Exact same problem here.

alexvdleek avatar Nov 28 '21 20:11 alexvdleek

Me too! I changed the name from light.wled to light.basement_stairs_wled and now I can't delete the light.wled entity!

Running on Home Assistant 2021.12.1 with Adaptive Lighting 1.0.14.

Screen Shot 2021-12-13 at 2 00 53 PM

EmnaX avatar Dec 13 '21 19:12 EmnaX

+1

broyuken avatar Dec 20 '21 03:12 broyuken

+1

peterbaker avatar Jan 07 '22 00:01 peterbaker

I'm having the same issue, is there any way to modify this configuration from YAML manually?

guinnberg avatar Feb 04 '22 12:02 guinnberg

hmm, I don't think you can modify the integration from yaml... BUT you can just set it up in yaml and use it going forward. Here is what I have in there now:

- name: "Basement Stairs"
  lights:
    - light.basement_stairs_wled
  prefer_rgb_color: false
  transition: 45
  initial_transition: 1
  interval: 90
  min_brightness: 30
  max_brightness: 100
  min_color_temp: 2000
  max_color_temp: 5500
  sleep_brightness: 10
  sleep_color_temp: 1000
  sunrise_time: "07:00:00"  # override the sunrise time
  sunrise_offset: 0
  sunset_time: "20:00:00"
  sunset_offset: 0  # 1800 (in seconds) or '00:15:00'
  take_over_control: true
  detect_non_ha_changes: false
  only_once: false

EmnaX avatar Feb 04 '22 17:02 EmnaX

Same problem here, deleted the instance and created a new one...

strelniece avatar Feb 08 '22 15:02 strelniece

i have some dummy lights set up just for this, so if i rename a light before i remove it from the config, i will just rename a dummy light to the old entity_id and then remove that from AL.

Nattfisk avatar Feb 10 '22 23:02 Nattfisk

For anyone else wondering how to create a dummy light, I just tried this. Create a template light in configuration.yaml with the entity_id that matches the deleted entity, reload template entities, remove the light from AL configuration in the UI, delete the template light and reload template entities again. Not ideal, but it works!

mikedrawback avatar Sep 30 '22 17:09 mikedrawback

Is this still happening with the latest version? Does this happen with the latest HA core?

th3w1zard1 avatar Mar 23 '23 17:03 th3w1zard1

I can't say as I am not using the integration anymore. Maybe one of the other peole that experienced the issue comment?

mvdwetering avatar Mar 23 '23 18:03 mvdwetering

Yeah I realize this is old. I'm trying to get to every single issue thread and make certain they're addressed. Thank you for getting back regardless @mvdwetering.

If you end up using the integration again, and notice this bug, please don't hesitate to post back here.

th3w1zard1 avatar Mar 23 '23 19:03 th3w1zard1

I can confirm that this is still happening.

basnijholt avatar Mar 25 '23 07:03 basnijholt

I just fixed this (finally) in https://github.com/basnijholt/adaptive-lighting/pull/669.

I will make a release in the coming days.

🎉

basnijholt avatar Jul 27 '23 06:07 basnijholt