diff --git a/homeassistant/components/automation/numeric_state.py b/homeassistant/components/automation/numeric_state.py index 23c2093637b..c3f94695216 100644 --- a/homeassistant/components/automation/numeric_state.py +++ b/homeassistant/components/automation/numeric_state.py @@ -58,8 +58,9 @@ def register(hass, config, action): """ Listens for state changes and calls action. """ # Fire action if we go from outside range into range - if numeric_in_range(to_s.state, above, below) and (from_s is None - or not numeric_in_range(from_s.state, above, below)): + if numeric_in_range(to_s.state, above, below) and \ + (from_s is None or \ + not numeric_in_range(from_s.state, above, below)): action() track_state_change(