some renames and other changes

This commit is contained in:
John Lancaster
2024-07-07 22:07:02 -05:00
parent 3481ff7976
commit 870424baa0
8 changed files with 24 additions and 18 deletions

View File

@@ -4,5 +4,3 @@ from appdaemon.adapi import ADAPI
class Database:
def __init__(self, ad: ADAPI) -> None:
self.ad = ad
# self.ad.logger.info(' NEW LOG LINE Database '.center(50, '='))
# self.ad.call_service()

View File

@@ -4,7 +4,9 @@ from appdaemon.adapi import ADAPI
class Notification:
def __init__(self, ad: ADAPI) -> None:
self.ad = ad
# self.ad.logger.info(' NEW LOG LINE '.center(50, '='))
self.log = self.ad.logger.info
self.log('Notification initialize')
# self.ad.logger.info(' NOTIFICATION '.center(50, '-'))
def send(self, message: str = "message not specified") -> None:
self.ad.log(message, level="DEBUG")
self.ad.log(f'NOTIFICATION: {message}', level="DEBUG")

View File

View File

@@ -1,6 +1,9 @@
from pathlib import Path
from appdaemon.adapi import ADAPI
class Foo(ADAPI):
def initialize(self):
self.log(f'Initialized from {__file__}')
self.log(f'Initialized app from {Path(__file__).relative_to(self.AD.app_dir.parent)}')
# self.log(' FOO '.center(50, '-'))