mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
homeassistant/components/automation/numeric_state.py:61:80: E501 line too long (80 > 79 characters)
The command "flake8 homeassistant" exited with 1.
This commit is contained in:
parent
e9da02d70c
commit
9904727cde
@ -28,7 +28,8 @@ def register(hass, config, action):
|
||||
above = config.get(CONF_ABOVE)
|
||||
|
||||
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)
|
||||
return False
|
||||
|
||||
@ -57,8 +58,8 @@ 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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user