Espurna auto added

I have been using Tasmota on my sonoff switches and nodemcu but thought I would give Espurna a go, as soon as I set it up it auto discovered and put a switch in my switch panel. I have decided to stick with Tasmota and reflashed the nodemcu but the espurna switch is still there as unavailable have looked in all the yaml files for any mention of the mac of the mcu and deleted them restarted HA but it is stil ther as a switch and a badge at the top of the screen

How do I get rid of this switch and badge ???

Cheers

Is it in known_devices.yaml?

No deleted all entries with that MAC address but espurna_0E850C is still in switches

Is it in the entity registry file?

No been through all the yaml files and deleted all entries with the MAC address associated with the node mcu
I have reflashed the nodemcu with code to use as a car presence node and the Mac comes up in known devices but still can’t find any entry for ESPURNA_0C8E50

I have no idea then, just hide it in customize.yaml :stuck_out_tongue:

I have a similar issue. Apparently needs to be cleaned up from MQTT but I’m not sure how to do that in hassio.

Hmmm can’t you use mqttfx or similar to send a flush command to get rid of the mqtt retained messages, if that’s what’s causing the issue?

See here…

https://www.hivemq.com/blog/mqtt-essentials-part-8-retained-messages

Ok, I’ve found a method to cleanup old, inactive topics. Apologies if this is rudimentary.

From the Developer services in HA, call the mqtt.publish service and send a zero byte payload to the topic you want to clear. You can find a current list of topics from either espyamlhome logging or SSH into HA and type:

mosquitto_sub -v -t '#'

The JSON when clearing the topic from HA:

{
"topic":"homeassistant/binary_sensor/alarm_panel/box__siren_tamper/config",
"retain":"true"
}

Then restart HA. Hope this helps.

hi tried this but it did not work so I have just hidden it in customise.yaml

Thanks for the help