Earlier quoted context omitted.
For folks here I strongly recommend installing the appdaemon integration and just writing python scripts. The downside is there is a good bit of learning curve and time investment just to get the hello world going (turn on a light at sunset?). Once you are there, you can write shared libraries, abstract away whatever you want, have legit tests, and just do anything you would normally want in your coding environment (…
Fully agree. Interested about the tests though. I’m not a professional python developer but would love automated tests for my appdaemon code. How did you set it up, and how do you run the tests?
It doesn't test that the service calls are correctly written, just that they were made. So, very useful for unit testing syntax / logic, but not a full end-to-end integration test solution. Still, with python being an interpreted language, this is super useful. I don't want to have to wait for it actually to be sunset to determine I have a syntax error in that branch of the code, for example.
I don't actually have the tests running on the HA device. I have them on my desktop where I develop the appdaemon scripts, and then I copy only the scripts over to HA. I'm sure there are multiple ways to do it.