Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lamp delation #47

Open
AdamN1 opened this issue May 7, 2021 · 4 comments
Open

Lamp delation #47

AdamN1 opened this issue May 7, 2021 · 4 comments

Comments

@AdamN1
Copy link

AdamN1 commented May 7, 2021

fallows conversation from #39 (comment)

Abandoned devices: we should no longer publish them to the discovery topic. In HA there is yet to exist an API to remove devices... currently you need to use the UI

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.

@AdamN1
Copy link
Author

AdamN1 commented Apr 17, 2022

@dgomes ??

@dgomes
Copy link
Owner

dgomes commented Apr 17, 2022

and how will you distinguish those ?

I think we should move away from retained topics and publish the topics upon home assistant restart

@AdamN1
Copy link
Author

AdamN1 commented Apr 18, 2022

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

@dgomes
Copy link
Owner

dgomes commented Apr 18, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants