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

Warning: Detected blocking call to sleep inside the event loop #39

Closed
rhammen opened this issue Nov 23, 2022 · 7 comments
Closed

Warning: Detected blocking call to sleep inside the event loop #39

rhammen opened this issue Nov 23, 2022 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rhammen
Copy link
Contributor

rhammen commented Nov 23, 2022

2022-11-23 21:50:51.926 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for luxtronik2 doing blocking calls at custom_components/luxtronik2/luxtronik_device.py, line 151: time.sleep(3)

@BenPru
Copy link
Owner

BenPru commented Nov 23, 2022

The option "update_immediately_after_write" is not working and currently not used. So this is not really a problem.
Has anyone an idea how to perform a direct sensor update after write action?

@BenPru BenPru added enhancement New feature or request help wanted Extra attention is needed labels Nov 23, 2022
@Kars-de-Jong
Copy link
Contributor

It is used though, otherwise you wouldn't get this message.
It is set to True in several places, in calls to write.

@Kars-de-Jong
Copy link
Contributor

You just have to move the wait & read to a separate thread I think.

@Kars-de-Jong
Copy link
Contributor

Hmm, I see the entities themselves aren't async friendly yet.

@BenPru
Copy link
Owner

BenPru commented Jan 26, 2023

Should be fixed in the future with the new integration.

@BenPru BenPru closed this as completed Jan 26, 2023
@rhammen
Copy link
Contributor Author

rhammen commented Oct 12, 2023

This issue is closed as "will be solved with the new integration", but I do still get this error with 2023.10.12 Beta:

Logger: homeassistant.util.async_
Source: util/async_.py:137
First occurred: 11:05:43 PM (8 occurrences)
Last logged: 11:07:54 PM

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for luxtronik2 doing blocking calls at custom_components/luxtronik2/lux_helper.py, line 252: time.sleep(WAIT_TIME_WRITE_PARAMETER)

@BenPru
Copy link
Owner

BenPru commented Oct 12, 2023

This issue is closed as "will be solved with the new integration", but I do still get this error with 2023.10.12 Beta:

This is part of the underlying package: https://github.com/Bouni/python-luxtronik
But I'm waiting for a new pypi release: #136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants