Replies: 3 comments 1 reply
-
Why don't you just |
Beta Was this translation helpful? Give feedback.
-
Is it just a |
Beta Was this translation helpful? Give feedback.
-
Thank you both, I should have said in the first place, i'm running ha in a docker container, and i found out that i can't easily reboot the host from a container... My pyscript function...
...send command to the flask route:
|
Beta Was this translation helpful? Give feedback.
-
I'm struggling to make a working script to reboot my pi when i click on a button. I made this script:
and assigned the service to my button but i get this log in HA:
2024-02-01 15:47:41.971 ERROR (MainThread) [custom_components.pyscript.file.test._restart_system] Exception in <file.test._restart_system> line 13:
restart_system()
^
FileNotFoundError: [Errno 2] No such file or directory: 'sudo'
I understood that once you wrapped a function in @pyscript_executor you can do anything you want, am i wrong ?
Beta Was this translation helpful? Give feedback.
All reactions