Deleted MQTT entities still present in HA UI - how to delete? Newbie needs help

I’m new to MQTT, not a skilled programmer, and would appreciate some help with the following problem:

I’ve integrated an Arduino board via LAN/MQTT using Mosquitto. Setting up the device and entities works well, but when I change the entities, old entities (for which there is no push anymore) still remain visible in HA, and sometimes mess up with the new configurations. How can I remove old entities?

  • Is there a config file someplace where I can delete it? Haven’t found it.
  • Can I run some sort of script at HA startup which cancels all MQTT devices. Not ideal solution though.

The only way that I have resolved this so far has been through restoring old backups, but this is not feasible going forward.

Many thanks for your help!!!

Hi Mats,

There are several posts on this forum discussing writing custom MQTT clients with auto-discovery - search is your friend.

Here’s a link which has a selection…

TL;DR

If this helps, :heart: this post!