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

Enable reload #355

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Enable reload #355

wants to merge 6 commits into from

Conversation

gigatexel
Copy link
Contributor

I'm aware that this will probably not get merged, but I'm still creating this PR for those who are intensively making Loxone Config changes and need to rapidly merge these changes with HA.
If you need or would benefit from a reload function, use the the changes in this PR.

The proposed changes are running error & warning-free on my install for some time now.

init.py

  • Calls the stop() function
  • Removes all services
  • Unloads all platforms
  • Removes orphaned entities/devices that are no longer present in Loxone. Not doing this results in unavailable entities and non-removeable devices
  • Starts the integration by default
  • Fully closes all listeners to avoid duplicates

api.py

  • Create locks for websockets to avoid race conditions and reads on closed sockets
  • Stop all background tasks to avoid duplicates when reloading

scene.py

  • Give the entities a real uniqueid instead of the uuid

@gigatexel
Copy link
Contributor Author

Added a release in this repo for those who need it: https://github.com/gigatexel/PyLoxone

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

Successfully merging this pull request may close these issues.

1 participant