Forgot to change 1 class when changing State from tuple to dict

This commit is contained in:
Paulus Schoutsen 2013-10-28 18:26:25 -07:00
parent 83d878810e
commit 58ac9e0aac

View File

@ -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"))