mirror of
https://github.com/home-assistant/core.git
synced 2025-08-24 06:51:33 +02:00
Fix numeric state if
This commit is contained in:
@@ -70,7 +70,7 @@ def if_action(hass, config, action):
|
|||||||
""" Execute action if state matches. """
|
""" Execute action if state matches. """
|
||||||
|
|
||||||
state = hass.states.get(entity_id)
|
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()
|
action()
|
||||||
|
|
||||||
return state_if
|
return state_if
|
||||||
|
Reference in New Issue
Block a user