tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
309 stars 53 forks source link

[Feature] Delete obsolete devices from integration #198

Closed mvdwetering closed 2 years ago

mvdwetering commented 2 years ago

Is your feature request related to a problem? Please describe.

I was experimenting with CAPsMAN and now I have a bunch of devices exposed by the MikroTik Router integration that do not exist in the router anymore. I can delete the entities after they became unavailable (by reloading integration), but not the devices.

Describe the solution you'd like

Most perfect would be autocleanup of those none existing CAPsMAN devices. Having a manual delete option would also be fine. It seems possible now to implement a Delete Device button now in Home Assistant, see https://developers.home-assistant.io/blog/2022/02/28/opt-in-remove-device

Describe alternatives you've considered

Manually editing the device registry in the .storage folder. Done it before and it is not that hard, but easy to mess up. Or remove and add the integration again, but that would probably break some automations and long term statistics.

Additional context

tomaae commented 2 years ago

this is already planned