home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.68k stars 30.43k forks source link

Energy -> Add Device also lists deleted helpers/sensors #126396

Open LaUr3nTiU opened 4 weeks ago

LaUr3nTiU commented 4 weeks ago

The problem

I was playing around with a few helpers (created from the UI) that I have added to the Energy tracking dashboard. I've then removed them from the dashboard, then removed them from HA altogether and now when I hit ADD DEVICE I am still allowed to search/select the deleted sensors.

When selecting such sensors, I get the following warning:

Entity not defined
Check the integration or your configuration that provides:
sensor.delete_me_2

Please note that sensors that were never added to the energy dashboard, but got deleted in the mean-time, are still available to be selected.

What version of Home Assistant Core has the issue?

core-2024.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Individual device energy usage

Link to integration documentation on our website

https://www.home-assistant.io/docs/energy/individual-devices/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

codyc1515 commented 3 weeks ago

It’s not clear at all where these sensors live or even how to delete them. This has been an issue for quite some time, even across new installs.

LaUr3nTiU commented 2 weeks ago

I think I have an idea of where those come from. I've deleted the statistics that were listed as There is no state available for this entity and now I no longer see the deleted sensors.