Deleted Entities Still Exist in Scenes

I saw a similar situation in the “WTH” category and would of wrote this reply there, but I could not expand in that area currently since it is locked from replying.

Today, I deleted a couple Light entities that I no longer used. These entities were used in a couple automations, dashboards, and scenes. Once I deleted those entities, I then went to the automations and dashboards and removed the UNKNOWN entities. However when I went to the scenes, they were already missing from the GUI.

Later today, I received a warning in my system log file that the entities were unknown. I searched forever to try to find these entities that I thought I missed deleting/replacing but could not find them anywhere.

On a hunch, I went into the scene where the entity use to exist and changed the view from the GUI to the YAML. There was the entity still in the YAML! I assume that because it was labeled as UNKNOWN, it did not show up in the GUI anymore. This led me to believe that it no longer existed in HA. If it wasn’t for the system log warning, I would not have realized that this entity still existed in the YAML.

Lesson learned is that if you are removing/replacing an entity in HA, then go through and delete it from you automations, dashboards, scenes, etc. BEFORE you actually delete it at the entity level. The GUI view will lead you to believe it is gone when it really still exists in the YAML code.

1 Like