There’s a python script integration in hass. I was trying to write a script, and then I realized I have no idea how to test or even run it. The only way I know how to launch it is to invoke via automation, and then log as a makeshift “print”, so that I can get an idea what script is doing
Needless to say, this is ridiculous. There’s no way plugin authors intended for the integration to be used that way
Can somebody describe to me what is the intended development process to those who are trying to write their own actions using python code? Specifically, I am looking to understand how to:
- create script (I presume via VSCode in python_scripts?)
- run script in python (“python python_scripts/my-script.py” will not work, there will be missing objects)
- run script in integrated vscode, so that I can have breakpoints, variable inspect, etc
- unit test the script