Mqtt auto discovery or not

I’m trying to use mqtt auto discovery to integrate a few Tasmota smart plug to HA. Reference https://www.home-assistant.io/docs/mqtt/discovery/. I also saw other people use manual config. I’m not clear about pros and cons of each approaches. Which method are you using and why? Thanks.

If they are just switches there is no need to do anything except discovery. You will have far fewer issues that way. Discovery is easy and just works.

1 Like

Can’t agree more. Auto discovery just works, never any issues.

2 Likes

yes, it is just a plug. I will leave it as auto discovery, Thanks.

There’s one potential hiccup with MQTT Discovery: a deleted entity might re-appear.

The discovery information might be posted to the discovery topic as a retained message. This is useful because it means it is retained (stored) by the MQTT Broker. When Home Assistant is restarted, it re-connects to the MQTT Broker, re-subscribes to the discovery topic and, because the messages are retained, Home Assistant gets them immediately (and the entity is preserved).

The potential hiccup is that if you delete the entity (perhaps because you no longer require it and you have removed the physical device it represents) Home Assistant may still (to your surprise) re-discover it and re-create the entity. Why? Because the device’s discovery data continues to be retained by the MQTT Broker (i.e. the MQTT Broker didn’t get the memo that the device’s discovery data is no longer needed).

The remedy is simple: purge the retained messages. However, if you don’t know that, the experience of deleting an entity and then having it magically re-appear (over and over) can be frustrating. There’s more than one thread on this forum where users have had this issue.

1 Like

Thanks for the info. Will keep this in mind.