Twinkly RGBW color fixed (#136593)

This commit is contained in:
Splint77 2025-01-27 16:53:26 +01:00 committed by GitHub
parent a2830e7ebb
commit 7c87bb2ffb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -99,9 +99,9 @@ class TwinklyLight(TwinklyEntity, LightEntity):
):
await self.client.interview()
if LightEntityFeature.EFFECT & self.supported_features:
# Static color only supports rgb
await self.client.set_static_colour(
(
kwargs[ATTR_RGBW_COLOR][3],
kwargs[ATTR_RGBW_COLOR][0],
kwargs[ATTR_RGBW_COLOR][1],
kwargs[ATTR_RGBW_COLOR][2],

View File

@ -140,7 +140,7 @@ async def test_turn_on_with_color_rgbw(
)
mock_twinkly_client.interview.assert_called_once_with()
mock_twinkly_client.set_static_colour.assert_called_once_with((128, 64, 32))
mock_twinkly_client.set_static_colour.assert_called_once_with((0, 128, 64, 32))
mock_twinkly_client.set_mode.assert_called_once_with("color")
assert mock_twinkly_client.default_mode == "color"