Fix turning on the light with a specific color (#108080)
This commit is contained in:
parent
5cc1a761dd
commit
52acc4bbab
2 changed files with 21 additions and 3 deletions
|
@ -89,6 +89,10 @@ class MatterLight(MatterEntity, LightEntity):
|
|||
colorY=int(matter_xy[1]),
|
||||
# It's required in TLV. We don't implement transition time yet.
|
||||
transitionTime=0,
|
||||
# allow setting the color while the light is off,
|
||||
# by setting the optionsMask to 1 (=ExecuteIfOff)
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -103,6 +107,10 @@ class MatterLight(MatterEntity, LightEntity):
|
|||
saturation=int(matter_hs[1]),
|
||||
# It's required in TLV. We don't implement transition time yet.
|
||||
transitionTime=0,
|
||||
# allow setting the color while the light is off,
|
||||
# by setting the optionsMask to 1 (=ExecuteIfOff)
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -114,6 +122,10 @@ class MatterLight(MatterEntity, LightEntity):
|
|||
colorTemperatureMireds=color_temp,
|
||||
# It's required in TLV. We don't implement transition time yet.
|
||||
transitionTime=0,
|
||||
# allow setting the color while the light is off,
|
||||
# by setting the optionsMask to 1 (=ExecuteIfOff)
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -202,6 +202,8 @@ async def test_color_temperature_light(
|
|||
command=clusters.ColorControl.Commands.MoveToColorTemperature(
|
||||
colorTemperatureMireds=300,
|
||||
transitionTime=0,
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
),
|
||||
),
|
||||
call(
|
||||
|
@ -278,7 +280,11 @@ async def test_extended_color_light(
|
|||
node_id=light_node.node_id,
|
||||
endpoint_id=1,
|
||||
command=clusters.ColorControl.Commands.MoveToColor(
|
||||
colorX=0.5 * 65536, colorY=0.5 * 65536, transitionTime=0
|
||||
colorX=0.5 * 65536,
|
||||
colorY=0.5 * 65536,
|
||||
transitionTime=0,
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
),
|
||||
),
|
||||
call(
|
||||
|
@ -311,8 +317,8 @@ async def test_extended_color_light(
|
|||
hue=167,
|
||||
saturation=254,
|
||||
transitionTime=0,
|
||||
optionsMask=0,
|
||||
optionsOverride=0,
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
),
|
||||
),
|
||||
call(
|
||||
|
|
Loading…
Add table
Reference in a new issue