diff --git a/apps/test/test.yaml b/apps/test/test.yaml index d5edb22..c7fd69b 100644 --- a/apps/test/test.yaml +++ b/apps/test/test.yaml @@ -1,5 +1,7 @@ test_notifier: - module: test_notify - class: TestNotifier + # module: test_notify + # class: TestNotifier + module: variant + class: Variant log_level: DEBUG # dependencies: companion_app \ No newline at end of file diff --git a/apps/test/test_notify.py b/apps/test/test_notify.py index b407066..7040ff7 100644 --- a/apps/test/test_notify.py +++ b/apps/test/test_notify.py @@ -7,5 +7,5 @@ class TestNotifier(ADBase): self.adapi = self.get_ad_api() self.log = self.adapi.log self.log(f'Initialized test notifier class: {self.__class__.__name__}') - self.notify = Notification(self.adapi) + self.notify = Notification(self.adapi, self.name) self.notify.send('Some notifications') diff --git a/apps/test/variant.py b/apps/test/variant.py new file mode 100644 index 0000000..b19119f --- /dev/null +++ b/apps/test/variant.py @@ -0,0 +1,9 @@ +from test_notify import TestNotifier +from appdaemon.adapi import ADAPI + +class Variant(TestNotifier, ADAPI): + def initialize(self): + self.adapi = self.get_ad_api() + self.log = self.adapi.log + self.log('Variant of the TestNotifier') + # self.log(' VARIANT '.center(50, '*'))