From fe2a9bb83e293612bbcf06ba62a7932e761cf14a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 14 Sep 2015 20:46:57 -0700 Subject: [PATCH] Fix numeric state if --- homeassistant/components/automation/numeric_state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/automation/numeric_state.py b/homeassistant/components/automation/numeric_state.py index 417ffffff7d..05a4f75a909 100644 --- a/homeassistant/components/automation/numeric_state.py +++ b/homeassistant/components/automation/numeric_state.py @@ -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