initial commit

This commit is contained in:
John Lancaster
2024-02-21 21:23:05 -06:00
commit 7d4098ce79
12 changed files with 97 additions and 0 deletions

11
apps/apps.yaml Normal file
View File

@@ -0,0 +1,11 @@
hello_world:
module: hello
class: HelloWorld
hello_sub:
module: my_pkg.my_sub_pkg.hello
class: HelloWorldSub
motion:
module: my_pkg
class: Motion

3
apps/apps.yaml.example Normal file
View File

@@ -0,0 +1,3 @@
hello_world:
module: hello
class: HelloWorld

7
apps/hello.py Executable file
View File

@@ -0,0 +1,7 @@
import appdaemon.adbase as ad
class HelloWorld(ad.ADBase):
def initialize(self):
self.adapi = self.get_ad_api()
self.log = self.adapi.log
self.log(f'Initialized app from {__file__}')

View File

@@ -0,0 +1,2 @@
from .motion import Motion
from .my_sub_pkg.hello import HelloWorldSub

View File

@@ -0,0 +1,8 @@
import appdaemon.adbase as ad
class Motion(ad.ADBase):
def initialize(self):
self.adapi = self.get_ad_api()
self.log = self.adapi.log
self.log(f'Initialized app from {__file__}')
# self.log(f'New log line asdfasdf')

View File

@@ -0,0 +1,8 @@
import appdaemon.adbase as ad
class HelloWorldSub(ad.ADBase):
def initialize(self):
self.adapi = self.get_ad_api()
self.log = self.adapi.log
self.log(f'Initialized app from {__file__}')
# self.log(f'CHANGED')

View File