broke out door function

This commit is contained in:
John Lancaster
2023-11-24 22:56:27 -06:00
parent f580c7cfda
commit 4d36c11bfb
2 changed files with 24 additions and 38 deletions

11
door.py Normal file
View File

@@ -0,0 +1,11 @@
from appdaemon.plugins.hass.hassapi import Hass
from room_control import RoomController
class DoorControl(Hass):
def initialize(self):
self.listen_state(self.door_open, entity_id=self.args['door'], new='on')
def door_open(self, entity, attribute, old, new, kwargs):
app: RoomController = self.get_app(self.args['app'])
app.activate_all_off()