dataclasses and bugfixes
This commit is contained in:
5
door.py
5
door.py
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user