"""Helper functions for Philips Hue v2."""


def normalize_hue_brightness(brightness):
    """Returns calculated brightness values"""

    if brightness is not None:
        # Hue uses a range of [0, 100] to control brightness.
        brightness = float((brightness / 255) * 100)

    return brightness


def normalize_hue_transition(transition):
    """Returns 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)

    return transition

@@ -93,17 +93,16 @@
 %22%22Return
-s
  calcula
@@ -118,29 +118,29 @@
 tness values
+.
 %22%22%22%0A
-%0A
     if brigh
@@ -353,17 +353,16 @@
 %22%22Return
-s
  rounded
@@ -379,21 +379,21 @@
 n values
+.
 %22%22%22%0A
-%0A
     if t

Fix Hue docstring (#62684)