Skip to content

Issue with task.executor and HA crashing #359

Answered by craigbarratt
afairclo asked this question in Q&A
Discussion options

You must be logged in to vote

The symptoms sound like something you are calling from pyscript is blocking, which will block the main HA thread. The obvious candidate is the requests.get, but you are correctly calling that via task.executor, so that shouldn't be the problem.

Does the stalling of HA only happen after you call the twitch_picker service? Could there be an infinite loop with it being called repeatedly (ie, does a side-effect of calling it cause another trigger to call it)? The fact that HA actually crashes, rather than just slwoing down, suggests this could be the issue.

The only other call that your function makes is hass.services.call(). That shouldn't block, but I'm not 100% sure. I'd recommend using th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@afairclo
Comment options

Answer selected by afairclo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants