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

Fix 2024.3 issue #34

Merged
merged 2 commits into from
Mar 10, 2024
Merged

Fix 2024.3 issue #34

merged 2 commits into from
Mar 10, 2024

Conversation

chatziko
Copy link
Collaborator

This PR contains two small changes:

  1. In _async_update_data we move most of the code in the coroutine itself, and only the long-running hub.details is run in the executor thread. Calling async code from within the executor thread is not always possible, since there is no event loop there. I guess this was ok before 2024.3 but some internal change broke it (2024.3 contains various async changes to decrease boot time, eg the use of eager tasks supported in python 3.12).

  2. hass.async_create_task is replaced by entry.async_create_task. This is likely unrelated to the issue, but the documentation suggestios that this is the way to call it.

I haven't tested the PR that much, but in my system it fixes the problems appeared in 2024.3.

@caronc caronc merged commit 186ace4 into caronc:main Mar 10, 2024
@caronc
Copy link
Owner

caronc commented Mar 10, 2024

@chatziko you have proven yourself time and time again how great of a contributor and source you are for this repository. I gave you contributor status which should give you more control over the repository. I also bumped your access to the core ultrasync repository too. I trust you won't bring either of them any harm. It will also allow you to skip the waiting process of getting your code upstream or vetting others.

Feel free to email me if you ever have any questions or concerns (my email is associated with my profile).

Edit: Just one last thing, my only request (even though it adds bloat to the code), is when you introduce a new feature for a panel, please exclusively lock it in it's own if panel_x blocks so it doesn't break other panels ;). For example, not all panels have a garage door option, etc.

Chris

@chatziko
Copy link
Collaborator Author

Thanks @caronc , I accepted the invitations, I'll try to help maintaining this integration to the extent that time allows. Don't worry I'll make sure to coordinate with you for any non-trivial change.

@homewirelessguy
Copy link

Hello and thank you for this work on the Ultrasync.

I have upgraded to:
Core
2024.4.3
Supervisor
2024.04.0
Operating System
12.2
Frontend
20240404.2

The manifest.json file in custom_components/ultrasync shows that I have version 1.0.7 loaded.

The sensors are NOT showing up in HA. The Area entity works as expected. I have a large system with 56 zones (sensors). Im happy to help get you logs or anything that could help you debug this! I have not loaded this integration in any prior version of HA so I have not seen what it means for the sensors to be working.
Thanks, David

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.

3 participants