Fix len method typo for Osram light (#78008)

* Fix `len` method typo for Osram light

* Fix typo in line 395
This commit is contained in:
Yevhenii Vaskivskyi
2022-09-08 08:49:36 +02:00
committed by GitHub
parent ea26c0bf77
commit 1802ecfc24

View File

@@ -373,7 +373,7 @@ class Luminary(LightEntity):
self._max_mireds = color_util.color_temperature_kelvin_to_mired(
self._luminary.min_temp() or DEFAULT_KELVIN
)
if len(self._attr_supported_color_modes == 1):
if len(self._attr_supported_color_modes) == 1:
# The light supports only a single color mode
self._attr_color_mode = list(self._attr_supported_color_modes)[0]
@@ -392,7 +392,7 @@ class Luminary(LightEntity):
if ColorMode.HS in self._attr_supported_color_modes:
self._rgb_color = self._luminary.rgb()
if len(self._attr_supported_color_modes > 1):
if len(self._attr_supported_color_modes) > 1:
# The light supports hs + color temp, determine which one it is
if self._rgb_color == (0, 0, 0):
self._attr_color_mode = ColorMode.COLOR_TEMP