improved logging

This commit is contained in:
John Lancaster
2024-04-27 13:41:29 -05:00
parent 6250b6b20c
commit 68edfde755
5 changed files with 50 additions and 26 deletions

View File

@@ -1,3 +1,4 @@
from logging import Logger
from appdaemon.plugins.hass.hassapi import Hass
from console import setup_component_logging
@@ -5,8 +6,10 @@ from room_control import RoomController
class Door(Hass):
logger: Logger
async def initialize(self):
setup_component_logging(self)
self.logger = setup_component_logging(self)
self.app: RoomController = await self.get_app(self.args['app'])
self.log(f'Connected to AD app [room]{self.app.name}[/]', level='DEBUG')