@@ -517,13 +517,13 @@ async def async_handle_light_on_service( # noqa: C901
517517 params [ATTR_COLOR_TEMP_KELVIN ]
518518 )
519519 elif ATTR_RGB_COLOR in params and ColorMode .RGB not in supported_color_modes :
520- assert (rgb_color := params .pop (ATTR_RGB_COLOR )) is not None
520+ rgb_color = params .pop (ATTR_RGB_COLOR )
521+ assert rgb_color is not None
521522 if ColorMode .RGBW in supported_color_modes :
522523 params [ATTR_RGBW_COLOR ] = color_util .color_rgb_to_rgbw (* rgb_color )
523524 elif ColorMode .RGBWW in supported_color_modes :
524- # https://github.com/python/mypy/issues/13673
525525 params [ATTR_RGBWW_COLOR ] = color_util .color_rgb_to_rgbww (
526- * rgb_color , # type: ignore[call-arg]
526+ * rgb_color ,
527527 light .min_color_temp_kelvin ,
528528 light .max_color_temp_kelvin ,
529529 )
@@ -584,9 +584,9 @@ async def async_handle_light_on_service( # noqa: C901
584584 elif (
585585 ATTR_RGBWW_COLOR in params and ColorMode .RGBWW not in supported_color_modes
586586 ):
587- assert ( rgbww_color : = params .pop (ATTR_RGBWW_COLOR )) is not None
588- # https://github.com/python/mypy/issues/13673
589- rgb_color = color_util .color_rgbww_to_rgb ( # type: ignore[call-arg]
587+ rgbww_color = params .pop (ATTR_RGBWW_COLOR )
588+ assert rgbww_color is not None
589+ rgb_color = color_util .color_rgbww_to_rgb (
590590 * rgbww_color , light .min_color_temp_kelvin , light .max_color_temp_kelvin
591591 )
592592 if ColorMode .RGB in supported_color_modes :
0 commit comments