mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
StateMachine.is_state was bugged
This commit is contained in:
parent
054d14d5de
commit
47d2c04c90
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user