Skip to content

Commit

Permalink
Merge pull request #358 from petretiandrea/343-l920-color-change-issues
Browse files Browse the repository at this point in the history
fix: change color and hue by setting brightness each time
  • Loading branch information
petretiandrea authored Jan 30, 2023
2 parents a7c2b38 + 850360d commit 9c9e3d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/tapo/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,16 @@ async def _change_color_temp(self, color_temp):
)

await self._execute_with_fallback(
lambda: self._tapo_coordinator.api.set_color_temperature(kelvin_color_temp)
lambda: self._tapo_coordinator.api.set_color_temperature(
kelvin_color_temp, self.brightness
)
)

async def _change_color(self, hs_color):
_LOGGER.debug("Change colors to: %s", str(hs_color))

await self._execute_with_fallback(
lambda: self._tapo_coordinator.api.set_hue_saturation(
hs_color[0], hs_color[1]
hs_color[0], hs_color[1], self.brightness
)
)

0 comments on commit 9c9e3d4

Please sign in to comment.