mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
More pylint 2 fixes (#15516)
* Pylint 2 useless-import-alias fixes * Pylint 2 chained-comparison fixes * Pylint 2 consider-using-get fixes * Pylint 2 len-as-condition fixes
This commit is contained in:
committed by
Paulus Schoutsen
parent
058081b1f5
commit
bf17ed0917
@@ -237,11 +237,11 @@ class HueOneLightChangeView(HomeAssistantView):
|
||||
# Convert 0-100 to a fan speed
|
||||
if brightness == 0:
|
||||
data[ATTR_SPEED] = SPEED_OFF
|
||||
elif brightness <= 33.3 and brightness > 0:
|
||||
elif 0 < brightness <= 33.3:
|
||||
data[ATTR_SPEED] = SPEED_LOW
|
||||
elif brightness <= 66.6 and brightness > 33.3:
|
||||
elif 33.3 < brightness <= 66.6:
|
||||
data[ATTR_SPEED] = SPEED_MEDIUM
|
||||
elif brightness <= 100 and brightness > 66.6:
|
||||
elif 66.6 < brightness <= 100:
|
||||
data[ATTR_SPEED] = SPEED_HIGH
|
||||
|
||||
if entity.domain in config.off_maps_to_on_domains:
|
||||
|
||||
Reference in New Issue
Block a user