Open AdamN1 opened 3 years ago
@dgomes ??
and how will you distinguish those ?
I think we should move away from retained topics and publish the topics upon home assistant restart
and how will you distinguish those ?
We can get list from mqtt server and compare records in topic.
I think we should move away from retained topics and publish the topics upon home assistant restart
I don't think that I understand what you mean
discovery topics need to be there only during HA start, you don't need to "store" them in the MQTT broker using the retain flag.
Each time HA starts it already publishes a message, dali2mqtt should subscribe to that message and publish all the lamps without retain flag, in this way there is no need to clear topics as they are never retained.
fallows conversation from https://github.com/dgomes/dali2mqtt/issues/39#issuecomment-834496089
Will you to accept PR with code for deleting missing lamps(remove from device.yaml)? By deleting I'm mean cleaning mqtt on the broker by the dali2mqtt. I know it's hack but it will help mqtt entity in the HA to stay clean.