def convert_rgb_to_hsv(rgb):
 (red, green, blue) = [(_ / BYTE_MAX) for _ in rgb]
 (hue, saturation, brightness) = colorsys.rgb_to_hsv(red, green, blue)
 return [int((hue * SHORT_MAX)), int((saturation * SHORT_MAX)), int((brightness * SHORT_MAX))]

def convert_rgb_to_hsv ( rgb ) : ( red , green , blue ) = [ ( _ / BYTE_MAX ) for _ in rgb ] ( hue , saturation , brightness ) = colorsys . rgb_to_hsv ( red , green , blue ) return [ int ( ( hue * SHORT_MAX ) ) , int ( ( saturation * SHORT_MAX ) ) , int ( ( brightness * SHORT_MAX ) ) ]
convert home assistant rgb values to hsv values .