MQTT Discovery entity storage

Does anyone know where the MQTT Discovery devices are stored? In all my testing I have a device that refuses to update or delete. Every time I send an empty payload or restart the device, I receive this message:

[homeassistant.components.mqtt.discovery] Component has already been discovered: sensor office_press, sending update

But it doesn’t remove or update the sensor, and it never shows up in /dev-state

While the temperature sensor is updating and removing as expected.

[homeassistant.components.mqtt.discovery] Component has already been discovered: sensor office_temp, sending update`
[homeassistant.components.mqtt] Got update for entity with hash: ('sensor', 'office_temp') '{'name': 'office temperature', 'device_class': 'temperature', 'state_topic': 'homeassistant/sensor/office/state', 'unit_of_measurement': '°F', 'value_template': '{{value_json.temperature}}'}'

All of my MQTT devices are manually defined in configuration.yaml but I believe MQTT Discovery stores what it finds in a file in the .storage directory (a sub-directory of your configuration directory).

I had all of my devices manually configured in yaml, but I decided to start using the discovery feature.

Nothing in the . storage directory has any reference at all to the sensors I published on discovery.

And of course, after I make a post about it, I went and modified the config payload and it shows up just like it’s supposed to. Sigh. Guess I’ll always have a sensor lost in the ether.

Hi, while fiddeling around with MQTT discovery I observed that HA forgets the entities during a restart.
You either have to send the config topic again or make it retained so the broker does it for you.
I assume that discovered entities aren’t persistently stored.

That’s a shame.

I just looked at my system. Some of my mqtt discovered devices are in .storage/core.entity_registry. Some are not. It seems that the ones that are in there are those that were discovered for the first time quite recently, possibly after a recent change that I didn’t pay much attention to concerning entity registry.

I’m only testing discovery with one device today. I will update my code on my other devices tomorrow and see if any of them show up in the registry. So far this one hasn’t.

According to a note in the documentation, this is the default behavior of the embedded MQTT Broker.

The embedded MQTT broker does not save any messages between restarts. If you use the embedded MQTT broker you have to send the MQTT discovery messages after every Home Assistant restart for the devices to show up.

Are you using the embedded broker or something else?

Out of curiosity what firmware are your MQTT devices using (Tasmoto, Espurna, etc)?

No I’m using a normal mosquitto docker alongside normal ha docker. I don’t use embedded and don’t use hassio.

My own firmware. I wrote ESP8266 firmware a couple of years ago for a bunch of devices. Now I’m just modifying them to accommodate the discovery feature.

Is the discovery still in release 0.83? There’s no config for

No config for what?