HA MQTT feedback when device is "discovered"

Hi,
Is there anyone here who knows how to get feedback from HA after a device is “discovered” via the MQTT discovery config topic?
E.g. an entry in the config topic that makes HA publish a “discovered” message over MQTT?
I mean without doing stuff in HA itself, since creating such is easy using an automation of some sort, but initialized when a device registers I can’t find in the documentation…

The documentation for MQTT Discovery doesn’t show the existence of an explicit “discovered” topic.

Implicitly, a new sub-topic created under the discovery prefix homeassistant would imply a new device/entity was created.

You can explore using the following two events:
device_registry_updated
entity_registry_updated

image

Hi Taras,
Thanks for your reply!
So as I understand I can check for those events in HA, but what I want is to make HA publish a message when a device is registered WITHOUT doing stuff in HA, so the device knows it is registered and make that happen via the config topic I send from the device to register it.
So let’s say: publish a discovery topic, detect if device and/or entities are registered and make HA automatically publish a message like “homeassistant/device ‘online’”, all initialized by the discovery topic sent from the device…

You have described an automation that uses an Event Trigger to listen for a specific event and then publishes a payload to a topic using the mqtt.publish service call.

Yep, and that I found out (and implemented) already, but in that case I have to create that automation in HA…
Or is there a way to create that automation via the config topic sent from the device?

No.