added dependency
This commit is contained in:
@@ -4,4 +4,7 @@ from appdaemon.adapi import ADAPI
|
|||||||
class Notification:
|
class Notification:
|
||||||
def __init__(self, ad: ADAPI) -> None:
|
def __init__(self, ad: ADAPI) -> None:
|
||||||
self.ad = ad
|
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")
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
globals:
|
globals:
|
||||||
module: globals
|
module: globals
|
||||||
global: true
|
global: true
|
||||||
|
companion_app:
|
||||||
|
module: app1.notification
|
||||||
|
global: true
|
||||||
@@ -5,5 +5,5 @@ from appdaemon.adbase import ADBase
|
|||||||
class Test(ADBase):
|
class Test(ADBase):
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
self.adapi = self.get_ad_api()
|
self.adapi = self.get_ad_api()
|
||||||
self.notification = Notification(self.adapi)
|
self.notify = Notification(self.adapi)
|
||||||
# self.notify.send("Test message from Test2 app.")
|
self.notify.send("Test message from Test2 app.")
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ test:
|
|||||||
module: test
|
module: test
|
||||||
class: Test
|
class: Test
|
||||||
log_level: DEBUG
|
log_level: DEBUG
|
||||||
|
dependencies: companion_app
|
||||||
Reference in New Issue
Block a user