Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Revert change to MQTT discovery_hash introduced in #18169 #18763
discovery_hash was changed in #18169 to be unique_id if present in the configuration.
I think it was more of a question, like "what should we do if unique id changes?". The issue was that using the system you implemented first entities with unqiue ids would not be recreatable since their entity id registration would error out because of duplicate unique ids.
But anyway, yes the ability to remove discovered entities with unqiue id would be good. Personally I don't see an issue with doing it the old way (not using unqiue id in discovery hash), you probably won't see too many scenarios where unique IDs on the same entity changes dynamically in the wild anyway. I guess let's just keep that undefined behavior, it probably won't be an issue.