added module import printing

This commit is contained in:
John Lancaster
2024-03-18 17:42:29 -05:00
parent d7b1ed1563
commit af433e7eb9
2 changed files with 14 additions and 4 deletions

View File

@@ -1,2 +1,6 @@
print(f' Importing {__name__} '.center(50, '='))
from .motion import Motion from .motion import Motion
from .my_sub_pkg.hello import HelloWorldSub from .my_sub_pkg.hello import HelloWorldSub
print(' Done '.center(50, '='))

View File

@@ -1,8 +1,14 @@
from pathlib import Path
import appdaemon.adbase as ad import appdaemon.adbase as ad
print(f' Importing {Path(__file__).name} '.center(50, '-'))
class Motion(ad.ADBase): class Motion(ad.ADBase):
def initialize(self): def initialize(self):
self.adapi = self.get_ad_api() self.adapi = self.get_ad_api()
self.log = self.adapi.log
self.log(f'Initialized app from {__file__}') self.changes = False
# self.log(f'New log line asdfasdf') self.adapi.log(f'Initialized app from {__file__} new line changes: {self.changes}')
print(f'Done, motion.changes = {Motion.changes}'.center(50, '-'))