From 47d2c04c904dcef6259b9719dc56787be896d312 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 31 Oct 2013 18:41:28 -0700 Subject: [PATCH] StateMachine.is_state was bugged --- homeassistant/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/__init__.py b/homeassistant/__init__.py index ad974331673..74c952fd9eb 100644 --- a/homeassistant/__init__.py +++ b/homeassistant/__init__.py @@ -234,9 +234,9 @@ class StateMachine(object): def is_state(self, category, state): """ Returns True if category exists and is specified state. """ - state = self.states.get(category, None) + cur_state = self.states.get(category, None) - return state and state['state'] == state + return cur_state and cur_state['state'] == state def get_state(self, category): """ Returns a dict (state,last_changed, attributes) describing