Enable setting brightness with color temp for smart devices (#1091)

This commit is contained in:
Steven B.
2024-07-31 15:52:27 +01:00
committed by GitHub
parent 7bba9926ed
commit cb7e904d30
5 changed files with 62 additions and 15 deletions

View File

@@ -107,7 +107,9 @@ class Light(SmartModule, LightInterface):
"""
if not self.is_variable_color_temp:
raise KasaException("Bulb does not support colortemp.")
return await self._device.modules[Module.ColorTemperature].set_color_temp(temp)
return await self._device.modules[Module.ColorTemperature].set_color_temp(
temp, brightness=brightness
)
async def set_brightness(
self, brightness: int, *, transition: int | None = None