Fix Hue docstring (#62684)
This commit is contained in:
parent
c3917fc250
commit
c79f13429c
1 changed files with 2 additions and 4 deletions
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
|
|
||||||
def normalize_hue_brightness(brightness):
|
def normalize_hue_brightness(brightness):
|
||||||
"""Returns calculated brightness values"""
|
"""Return calculated brightness values."""
|
||||||
|
|
||||||
if brightness is not None:
|
if brightness is not None:
|
||||||
# Hue uses a range of [0, 100] to control brightness.
|
# Hue uses a range of [0, 100] to control brightness.
|
||||||
brightness = float((brightness / 255) * 100)
|
brightness = float((brightness / 255) * 100)
|
||||||
|
@ -12,8 +11,7 @@ def normalize_hue_brightness(brightness):
|
||||||
|
|
||||||
|
|
||||||
def normalize_hue_transition(transition):
|
def normalize_hue_transition(transition):
|
||||||
"""Returns rounded transition values"""
|
"""Return rounded transition values."""
|
||||||
|
|
||||||
if transition is not None:
|
if transition is not None:
|
||||||
# hue transition duration is in milliseconds and round them to 100ms
|
# hue transition duration is in milliseconds and round them to 100ms
|
||||||
transition = int(round(transition, 1) * 1000)
|
transition = int(round(transition, 1) * 1000)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue