Remove old integrations - COMPLETELY

Hi, like many others (I’ve done the research), I am trying to completely remove old integrations. Apologies if I have missed the post which explains how to do this. I had multiple Sonoff Basics, which I am replacing with Sonoff Mini’s, but now I have multiple Bathroom Lights, Kitchen Lights, etc. I have tried, as other have suggested, deleting them from the Entity Registry, but upon restart, they are back again. I know we could also possibly ‘hide’ them, but thats just skirting around the issue. Surely there is a way to remove and clean up the old outdated devices which no longer exist?

1 Like

Were the Sonoff Basics flashed with Tasmota and were you using MQTT Discovery to automatically create entities for them?

If you were, then I think I know why they magically re-appear upon startup.

The MQTT Discovery process creates a configuration topic for each entity. This topic probably contains a retained message (i.e the data is stored on the MQTT Broker). You need to purge those retained messages. Easiest way is by using MQTT Explorer.

Hi, yes, they had Tasmota installed with MQTT Discovery. I downloaded MQTT Explorer, but can find the duplicate entries, I can only seem to see the live current new ones. Where can I see the old ones to delete them?

Delete all retained messages. Tasmota will make new.

These configuration topics typically start with homeassistant followed by the entity’s type. For example, this topic would be used to create binary_sensor.front_door

homeassistant/binary_sensor/front_door/config

The payload published to this topic would contain more information about the binary_sensor (such as its device_class, the name of its state topic, etc). This payload was published as a retained message, meaning it is stored on the MQTT Broker and available to any subscriber, like Home Assistant. You need to delete that message, using MQTT Explorer, to prevent Home Assistant from automatically re-discovering the (old) entity.

Hi, thanks for the info, I totally deleted all things in ‘homeassistant’, light, sensor, switch, deleted the lot, restarted Home Assitant, but they are still there in Integrations, although they are no longer there in the Entity Registry.