more changes for dictionary unpacking
This commit is contained in:
@@ -17,11 +17,11 @@ class Patio(Hass):
|
||||
def light(self) -> Entity:
|
||||
return self.get_entity(self.args['light'])
|
||||
|
||||
def handle_door_open(self, entity: str, attribute: str, old: str, new: str, kwargs: dict):
|
||||
def handle_door_open(self, entity: str, attribute: str, old: str, new: str, **kwargs):
|
||||
self.log('Door open')
|
||||
if self.AD.sched.location.solar_elevation() <= 0:
|
||||
self.light.turn_on(**self.args['state'])
|
||||
|
||||
def handle_door_close(self, entity: str, attribute: str, old: str, new: str, kwargs: dict):
|
||||
def handle_door_close(self, entity: str, attribute: str, old: str, new: str, **kwargs):
|
||||
self.log('Door close')
|
||||
self.run_in(callback=lambda *args: self.light.turn_off(), delay=30.0)
|
||||
|
||||
Reference in New Issue
Block a user