all but the last 6 of them are still active in my environment.
i searched the whole .homeassistant directory, but couldn’t find any file holding those sensors!
where are they stored/located? and how will i be able to remove them?
I was using this with Espurna, and it’s due to the persistent messages which are published to the homeassistant discovery topic prefix, in my case homeassistant
If you are setup like this, you can see what persistent HA mqtt discovery is there: mosquitto_sub -h MY_MQTT_HOST -v -t HA_DISCOVERY_TOPIC_PREFIX/#
Then I could “delete” abandoned devices by publishing a persistent, null message to same “config” topic e.g. $ mosquitto_pub -h MY_MQTT_HOST -r -n -t homeassistant/light/ESPURNA-DESKLAMP_0/config
(then restart HA to take effect)
where the topic, homeassistant/light/ESPURNA-DESKLAMP_0/config, was the thing that kept this thing showing up in HA after restarts.
^^ That sounds very “intuitive”…
I’m struggling with the same issue, but I guess a simple “remove” button in the Webui is just too easy?
Additionally, I cant locate the configuration file for these discovered switches.
Any ideas where to look?
Just in case anyone is looking at this later. The lines are done from the CLI using the SSH plugin (HASSIO). That said, you can use any MQTT client to Publish a blank retained message to the topic for your auto discovery for the device you wish to remove.
Auto discovery seems to use a retained MQTT message in order to configure the device. It works well, but is not the most intuitive thing to remove.