Fix Hue docstring (#62684)

This commit is contained in:
Marcel van der Veldt 2021-12-23 16:41:22 +01:00 committed by GitHub
parent c3917fc250
commit c79f13429c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,8 +2,7 @@
def normalize_hue_brightness(brightness):
"""Returns calculated brightness values"""
"""Return calculated brightness values."""
if brightness is not None:
# Hue uses a range of [0, 100] to control brightness.
brightness = float((brightness / 255) * 100)
@ -12,8 +11,7 @@ def normalize_hue_brightness(brightness):
def normalize_hue_transition(transition):
"""Returns rounded transition values"""
"""Return rounded transition values."""
if transition is not None:
# hue transition duration is in milliseconds and round them to 100ms
transition = int(round(transition, 1) * 1000)