Improve supported_color_modes typing in Light (#50969)

This commit is contained in:
Franck Nijhof 2021-05-22 19:48:58 +02:00 committed by GitHub
parent 4948bec8d5
commit f4289b3fca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -570,7 +570,7 @@ class LightEntity(ToggleEntity):
_attr_rgb_color: tuple[int, int, int] | None = None
_attr_rgbw_color: tuple[int, int, int, int] | None = None
_attr_rgbww_color: tuple[int, int, int, int, int] | None = None
_attr_supported_color_modes: set | None = None
_attr_supported_color_modes: set[str] | None = None
_attr_supported_features: int = 0
_attr_xy_color: tuple[float, float] | None = None
@ -821,7 +821,7 @@ class LightEntity(ToggleEntity):
return supported_color_modes
@property
def supported_color_modes(self) -> set | None:
def supported_color_modes(self) -> set[str] | None:
"""Flag supported color modes."""
return self._attr_supported_color_modes