Will the MQTT devices that I've removed the discovery topics for eventually disappear?

So my another software has published a lot of discovery entries into a non-persistent mosquitto bus, and they were added into the MQTT integration device list. Now I’ve removed (by sending empty strings) most of those entries, but the devices are still around even after the broker restart. At least they’re “unavailable”, but they are there.
Is there any automated cleanup procedure, or at least some manual mass remove function for me not to delete those one by one? So that when they’re published again, they will re-appear when needed

Troubleshooting MQTT? MQTT-Explorer can help you be successful!
If you have Apps available, try adding this App repository to your Apps list. GitHub - GollumDom/addon-repository.
With this you can see that the broker sees and likely find the bug.

You need to restart home assistant, not the broker.

Edit: additional steps that may be required after the restart:

  1. Go to Settings → Devices & Services → Entities list. Filter on Status “Not Provided”. You can bulk select and delete if requied.

  2. Go to Settings → Developer Tools → Statistics. If your entities provided long term statistics (LTS) there may be Fix Issue buttons next to them that will allow you to delete the LTS. Again this can be done in bulk with the multi-select option.

1 Like