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

Fixed async call on 2024.5.0 #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jolcese
Copy link

@jolcese jolcese commented May 25, 2024

No description provided.

@njobrien1006
Copy link
Contributor

I don't believe this is correct. All of the PAHO.MQTT functions are SYNC and handled via an independent thread and not the ASYNC.loop.

Can you elaborate on what led you to this change?

@mtnolan
Copy link

mtnolan commented Jun 8, 2024

Confirmed this resolves breaking change.

@njobrien1006
Copy link
Contributor

Out of curiosity, I reloaded this integration to get/see the error:

2024-06-09 10:32:45.970 WARNING (Thread-2 (_mqtt_connect_func)) [homeassistant.helpers.frame] Detected that custom integration 'traeger' calls async_create_task from a thread at custom_components/traeger/traeger.py, line 230: self.hass.async_create_task(self.update_state(grill_id)), please report it to the author of the 'traeger' custom integration
2024-06-09 10:32:45.971 ERROR (Thread-2 (_mqtt_connect_func)) [custom_components.traeger] Caught exception in on_subscribe: Detected that custom integration 'traeger' calls async_create_task from a thread at custom_components/traeger/traeger.py, line 230: self.hass.async_create_task(self.update_state(grill_id)). Please report it to the author of the 'traeger' custom integration.
2024-06-09 10:32:45.972 ERROR (Thread-2 (_mqtt_connect_func)) [root] Uncaught thread exception

The error is actually @ Line 230.

That error is actually in relationship to async_create_task being called from a thread. See additional fix details 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.

3 participants