Files
ad-dev-conf/apps/my_repo/my_pkg/foo.py
2024-05-03 08:25:20 -05:00

19 lines
531 B
Python

from pathlib import Path
from appdaemon.adbase import ADBase
filename = Path(__file__).name
# print(f' Importing {filename} '.center(50, '-'))
class Foo(ADBase):
changes: bool = True
def initialize(self):
self.adapi = self.get_ad_api()
self.adapi.log(f'Initialized app from {filename} new line changes: {self.changes}')
# self.adapi.log(f'New log line: {self.changes}')
# self.adapi.log(f'Even newer log line: {self.changes}')
# print(f' Foo.changes = {Foo.changes} '.center(50, '-'))