Fix numeric state if
This commit is contained in:
parent
2fe8b154f1
commit
fe2a9bb83e
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ def if_action(hass, config, action):
|
|||
""" Execute action if state matches. """
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
if state is None or _in_range(state.state, above, below):
|
||||
if state is not None and _in_range(state.state, above, below):
|
||||
action()
|
||||
|
||||
return state_if
|
||||
|
|
Loading…
Add table
Reference in a new issue