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 issue with blocked communication and reload #168

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

Conversation

Kannut
Copy link

@Kannut Kannut commented Mar 15, 2025

Handle blocking calls in a better way

In init cancel stream first

Fixes #167

receiver = servicebus_client.get_subscription_receiver(
topic_name=conf["Topic"], subscription_name=conf["Subscription"]
)
async with servicebus_client:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see I made this line duplicate

topic_name=conf["Topic"], subscription_name=conf["Subscription"]
)
async with servicebus_client:
receiver = await hass.async_add_executor_job(
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test this properly. hass is not defined at here. Not sure if this change actually fixes what I thought it did since it seemed to work first time I tried. I can send a restart charger command but not a resume command.

What will the best way be to get hass here?

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.

Reload of integration not working
1 participant