formatting
This commit is contained in:
@@ -8,5 +8,5 @@ class Notification:
|
|||||||
self.log('Notification initialize')
|
self.log('Notification initialize')
|
||||||
# self.ad.logger.info(' NOTIFICATION '.center(50, '-'))
|
# self.ad.logger.info(' NOTIFICATION '.center(50, '-'))
|
||||||
|
|
||||||
def send(self, message: str = "message not specified") -> None:
|
def send(self, message: str = 'message not specified') -> None:
|
||||||
self.ad.log(f'NOTIFICATION: {message}', level="DEBUG")
|
self.ad.log(f'NOTIFICATION: {message}', level='DEBUG')
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
from appdaemon.adapi import ADAPI
|
|
||||||
|
|
||||||
from app1.subdir.foo import Foo
|
from app1.subdir.foo import Foo
|
||||||
|
|
||||||
|
|
||||||
class OtherDatabaseApp(Foo):
|
class OtherDatabaseApp(Foo):
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
super().initialize()
|
super().initialize()
|
||||||
self.log(f'Initialized from {__file__}')
|
self.log('This app inherits from a custom class')
|
||||||
# self.log(' CHANGE '.center(50, '-'))
|
# self.log(' CHANGE '.center(50, '-'))
|
||||||
|
|
||||||
@@ -8,4 +8,4 @@ class TestNotifier(ADBase):
|
|||||||
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.notify.send("Some notifications")
|
self.notify.send('Some notifications')
|
||||||
|
|||||||
Reference in New Issue
Block a user