reorg and other stuff

This commit is contained in:
John Lancaster
2024-06-06 20:58:00 -05:00
parent 69134399f4
commit 6a2877ca71
11 changed files with 36 additions and 23 deletions

View File

@@ -0,0 +1,6 @@
# print(f' Importing {__name__} '.center(50, '='))
from .foo import Foo
from .my_sub_pkg.bar import Bar
# print(' Done '.center(50, '='))

View File

@@ -0,0 +1,18 @@
from pathlib import Path
from appdaemon.adbase import ADBase
filename = Path(__file__).name
# print(f' Importing {filename} '.center(50, '-'))
class Foo(ADBase):
changes: bool = True
def initialize(self):
self.adapi = self.get_ad_api()
self.adapi.log(f'Initialized app from {filename} new line changes: {self.changes}')
# self.adapi.log(f'New log line: {self.changes}')
# self.adapi.log(f'Even newer log line: {self.changes}')
# print(f' Foo.changes = {Foo.changes} '.center(50, '-'))

View File

@@ -0,0 +1,5 @@
# print(f' Importing {__name__} '.center(50, '+'))
from .bar import Bar
# print(f' Done {__name__} '.center(50, '+'))

View File

@@ -0,0 +1,12 @@
from pathlib import Path
from appdaemon.adbase import ADBase
filename = Path(__file__).name
# print(f' Importing {filename} '.center(50, '-'))
class Bar(ADBase):
def initialize(self):
self.adapi = self.get_ad_api()
self.adapi.log(f'Initialized app from {filename}')
# self.adapi.log(f'CHANGED')

View File

@@ -0,0 +1,13 @@
from pathlib import Path
from appdaemon.adbase import ADBase
filename = Path(__file__).name
# print(f' Importing {filename} '.center(50, '-'))
class Baz(ADBase):
def initialize(self):
self.adapi = self.get_ad_api()
self.adapi.log(f'Initialized app from {filename}')
# self.adapi.log(f'Initialized app from {filename}')
# self.adapi.log(f'CHANGED')