PyScript "modal behavior" - or is PyScript "making HA a single thread program" (executing in mainloop) ? #868
|
Great option to have PyScript work in the HA environment but it puzzles me that when I (via Tools initially) start a PyScript, it seems that most of the "interactive" HA system (refresh/update dashboards, notification panel, ...) seems to be blocked? I am a rookie in both HA and PyScript programming, so I am using Copilot to help me write it - but still, I am surprised that this PyScript thread somehow seems to make (at least the interactive part of) HA into a single-thread PyScript execution. Only some seconds after the script has stopped, the interaction "wakes up" again??? |
Replies: 3 comments 4 replies
|
It IS some core HA elements that seem to be affected as the Z2M module is also "restarting" when the PyScript takes (too long) time |
|
Is there anything in the log file? Have you tried disabling some functions to figure where the issue might be? You need to provide more details (eg, code and descriptions of what you are trying to do) if you want feedback or debugging help. |
|
Please also provide the |
It sounds like you are executing code in pyscript that takes many seconds or minutes to run. That most definitely needs to be run in an executor thread, not in the event loop.