How to delete entities created by mistake

Hello,
how can I delete entities created with AppDaemon? They are read-only in the UI and self.remove_entity() says “WARNING HASS: Code: 405, error: 405: Method Not Allowed”.

Thanks a lot!

1 Like

They should be removed if you restart HA.

Ah, now they are gone! :grinning:
I already tried a restart once, but I think they were still in the cache.

Thank you!

Does somebody know a way to remove an entity created with appdaemon without to restart?

Thanks

Yes, there is a remove_entity() method.

https://appdaemon.readthedocs.io/en/latest/AD_API_REFERENCE.html?highlight=remove_entity#appdaemon.adapi.ADAPI.remove_entity

I tried it, but i got the same error message as the original poster. "WARNING HASS: Code: 405, error: 405: Method Not Allowed”. Couldn’t find anything to this error except this post. What could stop this function from working?

Thanks

I haven’t tried but I think it’s possible that it wont work in the HA namespace so rebooting HA might be your only option.

If you have an appdaemon running you can use self.remove_entity:

https://appdaemon.readthedocs.io/en/latest/AD_API_REFERENCE.html#appdaemon.adapi.ADAPI.remove_entity