added variant

This commit is contained in:
John Lancaster
2024-07-08 17:55:32 -05:00
parent 9210cbf8a1
commit 03ebbcc1f0
3 changed files with 14 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
test_notifier: test_notifier:
module: test_notify # module: test_notify
class: TestNotifier # class: TestNotifier
module: variant
class: Variant
log_level: DEBUG log_level: DEBUG
# dependencies: companion_app # dependencies: companion_app

View File

@@ -7,5 +7,5 @@ class TestNotifier(ADBase):
self.adapi = self.get_ad_api() self.adapi = self.get_ad_api()
self.log = self.adapi.log self.log = self.adapi.log
self.log(f'Initialized test notifier class: {self.__class__.__name__}') 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') self.notify.send('Some notifications')

9
apps/test/variant.py Normal file
View File

@@ -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, '*'))