added dependency

This commit is contained in:
John Lancaster
2024-06-06 23:21:19 -05:00
parent caea4ac448
commit 423465a111
4 changed files with 11 additions and 4 deletions

View File

@@ -4,4 +4,7 @@ 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.ad.logger.info(' NEW LOG LINE '.center(50, '='))
def send(self, message: str = "message not specified") -> None:
self.ad.log(message, level="DEBUG")

View File

@@ -1,3 +1,6 @@
globals:
module: globals
global: true
companion_app:
module: app1.notification
global: true

View File

@@ -5,5 +5,5 @@ from appdaemon.adbase import ADBase
class Test(ADBase):
def initialize(self):
self.adapi = self.get_ad_api()
self.notification = Notification(self.adapi)
# self.notify.send("Test message from Test2 app.")
self.notify = Notification(self.adapi)
self.notify.send("Test message from Test2 app.")

View File

@@ -2,3 +2,4 @@ test:
module: test
class: Test
log_level: DEBUG
dependencies: companion_app