Delete old MQTT entity, no device, not MQTT discovery, not in YAML, just stuck

I was cleaning up MQTT names after the new changes, and ran across some entities that are now showing disabled. I do not recall if I disabled them or it did. They are from old, abandoned work.

Here is one example. This was once from an esphome sensor device that via MQTT discovery and created this entity. The device no longer shows up at all (correct), only the entity is still there. Two actually from that device.

I have already, long ago, deleted the MQTT discovery topic, in fact the word “fridge” does not appear anywhere in the MQTT database that I can find. I do not believe this was ever created in YAML (I generally do not do that), but have confirmed it is not in YAML now (grep’d the whole config folder tree).

Any ideas?

Again – not in MQTT discovery topics, not in MQTT anywhere, not in any config file, HA restarted many, many times. Currently running 2023.08.1 os 10.4 frontend 20230802.0.

Thanks in advance,

Linwood

Settings → Devices and Settings → MQTT → Entities → Check entity → Remove selected

You might need to show all entities in the filter

afbeelding

Remove selected does not work, it says “Only 0 of the selected entities can be removed” and that they can only be removed if the integration is no longer providing them. It acts like they are discovered entities, except they are no longer in the MQTT discovery section.

Using MQTT Explorer, you don’t see it as a retained message ?

Definitely not. I use MQTT a lot, have written clients for it. It’s not there Here’s the discovery section for sensors. It’s also not there as a separate topic.

mqtt

tried sending an empty discovery message ?

I have not, that’s an interesting approach. … OK, I have now, no impact. Though what exactly does “empty” look like? I included simple stuff like this. I don’t know what to use as a device name either, HA doesn’t appear to have it associated with a device, at least if it is, I can’t tell. I made one up. I also tried it with the unique ID with that x at the end and without, hoping that was the unique ID originally (I have no idea and not sure where to look).

Any idea what it should look like?

PS. I’m east coast, it’s late, I will follow up further in the morning when my brain is working better. Thank you for the suggestions.

homeassistant/sensor/fridge/fridge_utility_humidity/config

{
  "dev_cla": "humidity",
  "stat_cla": "measurement",
  "name": "fridge_utility_humidity",
  "uniq_id": "ESPsensorfridge_utility_humidityx",
}

This

with no payload

Enable the entity, restart then delete it.

1 Like

Nothing. Didn’t know I could send it empty but it did, but no impact.

I swear I tried that, but apparently not. That appears to have worked. At least a second restart it didn’t come back. Thank you. Probably should have slept first, really thought I already tried that. Sigh. Thanks.

1 Like