homeassistant/components/automation/numeric_state.py:61:80: E501 line too long (80 > 79 characters)

The command "flake8 homeassistant" exited with 1.
pull/353/head
Stefan Jonasson 2015-09-13 20:16:51 +02:00
parent e9da02d70c
commit 9904727cde
1 changed files with 4 additions and 3 deletions

View File

@ -28,7 +28,8 @@ def register(hass, config, action):
above = config.get(CONF_ABOVE) above = config.get(CONF_ABOVE)
if below is None and above is None: if below is None and above is None:
_LOGGER.error("Missing configuration key. One of %s or %s is required", _LOGGER.error("Missing configuration key."
" One of %s or %s is required",
CONF_BELOW, CONF_ABOVE) CONF_BELOW, CONF_ABOVE)
return False return False
@ -57,8 +58,8 @@ def register(hass, config, action):
""" Listens for state changes and calls action. """ """ Listens for state changes and calls action. """
# Fire action if we go from outside range into range # Fire action if we go from outside range into range
if numeric_in_range(to_s.state, above, below) and \ if numeric_in_range(to_s.state, above, below) and (from_s is None
(from_s is None or not numeric_in_range(from_s.state, above, below)): or not numeric_in_range(from_s.state, above, below)):
action() action()
track_state_change( track_state_change(