mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Forgot to change 1 class when changing State from tuple to dict
This commit is contained in:
parent
83d878810e
commit
58ac9e0aac
@ -127,7 +127,7 @@ class LightTrigger(object):
|
||||
|
||||
# Specific device came home ?
|
||||
if (category != STATE_CATEGORY_ALL_DEVICES and
|
||||
new_state.state == DEVICE_STATE_HOME):
|
||||
new_state['state'] == DEVICE_STATE_HOME):
|
||||
|
||||
# These variables are needed for the elif check
|
||||
now = datetime.now()
|
||||
@ -163,7 +163,7 @@ class LightTrigger(object):
|
||||
|
||||
# Did all devices leave the house?
|
||||
elif (category == STATE_CATEGORY_ALL_DEVICES and
|
||||
new_state.state == DEVICE_STATE_NOT_HOME and lights_are_on):
|
||||
new_state['state'] == DEVICE_STATE_NOT_HOME and lights_are_on):
|
||||
|
||||
self.logger.info(("Everyone has left but lights are on. "
|
||||
"Turning lights off"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user