As I find myself getting more proficient at python I’m wondering what strategies people think are best for writing more complex code in Appdaemon. Specifically code reuse.
If you are writing your own libraries, classes, functions are you copying and pasting them, importing them into your Appdeamon class from another file, writing them into the file and using code composition, using global modules, or using self.get_app?
I find myself needing more complicated classes that don’t need to be there own stand alone app such as checking the temperature of a room with backups or a class that can tell when and if motion happened in rooms that have 0 to 2 motion detectors. Some of these can stand alone ,but most need Appdaemon functionality like self.log and self.get_state .