logging improvements

This commit is contained in:
John Lancaster
2023-11-25 19:29:28 -06:00
parent afc5e45642
commit af28cda9a5
3 changed files with 11 additions and 15 deletions

View File

@@ -4,8 +4,5 @@ from room_control import RoomController
class Door(Hass):
async def initialize(self):
await self.listen_state(self.door_open, entity_id=self.args['door'], new='on')
async def door_open(self, entity, attribute, old, new, kwargs):
app: RoomController = await self.get_app(self.args['app'])
await app.activate_all_off()
await self.listen_state(app.activate_all_off, entity_id=self.args['door'], new='on', cause='door open')