mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove default transition in Matter light platform (#126220)
* Remove default transition in Matter light platform * adjust test
This commit is contained in:
parent
3f531c02a2
commit
d90caf3e86
@ -41,7 +41,6 @@ COLOR_MODE_MAP = {
|
|||||||
clusters.ColorControl.Enums.ColorMode.kCurrentXAndCurrentY: ColorMode.XY,
|
clusters.ColorControl.Enums.ColorMode.kCurrentXAndCurrentY: ColorMode.XY,
|
||||||
clusters.ColorControl.Enums.ColorMode.kColorTemperature: ColorMode.COLOR_TEMP,
|
clusters.ColorControl.Enums.ColorMode.kColorTemperature: ColorMode.COLOR_TEMP,
|
||||||
}
|
}
|
||||||
DEFAULT_TRANSITION = 0.2
|
|
||||||
|
|
||||||
# there's a bug in (at least) Espressif's implementation of light transitions
|
# there's a bug in (at least) Espressif's implementation of light transitions
|
||||||
# on devices based on Matter 1.0. Mark potential devices with this issue.
|
# on devices based on Matter 1.0. Mark potential devices with this issue.
|
||||||
@ -287,7 +286,7 @@ class MatterLight(MatterEntity, LightEntity):
|
|||||||
xy_color = kwargs.get(ATTR_XY_COLOR)
|
xy_color = kwargs.get(ATTR_XY_COLOR)
|
||||||
color_temp = kwargs.get(ATTR_COLOR_TEMP)
|
color_temp = kwargs.get(ATTR_COLOR_TEMP)
|
||||||
brightness = kwargs.get(ATTR_BRIGHTNESS)
|
brightness = kwargs.get(ATTR_BRIGHTNESS)
|
||||||
transition = kwargs.get(ATTR_TRANSITION, DEFAULT_TRANSITION)
|
transition = kwargs.get(ATTR_TRANSITION, 0)
|
||||||
if self._transitions_disabled:
|
if self._transitions_disabled:
|
||||||
transition = 0
|
transition = 0
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ async def test_dimmable_light(
|
|||||||
endpoint_id=1,
|
endpoint_id=1,
|
||||||
command=clusters.LevelControl.Commands.MoveToLevelWithOnOff(
|
command=clusters.LevelControl.Commands.MoveToLevelWithOnOff(
|
||||||
level=128,
|
level=128,
|
||||||
transitionTime=2,
|
transitionTime=0,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
matter_client.send_device_command.reset_mock()
|
matter_client.send_device_command.reset_mock()
|
||||||
@ -237,7 +237,7 @@ async def test_color_temperature_light(
|
|||||||
endpoint_id=1,
|
endpoint_id=1,
|
||||||
command=clusters.ColorControl.Commands.MoveToColorTemperature(
|
command=clusters.ColorControl.Commands.MoveToColorTemperature(
|
||||||
colorTemperatureMireds=300,
|
colorTemperatureMireds=300,
|
||||||
transitionTime=2,
|
transitionTime=0,
|
||||||
optionsMask=1,
|
optionsMask=1,
|
||||||
optionsOverride=1,
|
optionsOverride=1,
|
||||||
),
|
),
|
||||||
@ -348,7 +348,7 @@ async def test_extended_color_light(
|
|||||||
command=clusters.ColorControl.Commands.MoveToColor(
|
command=clusters.ColorControl.Commands.MoveToColor(
|
||||||
colorX=0.5 * 65536,
|
colorX=0.5 * 65536,
|
||||||
colorY=0.5 * 65536,
|
colorY=0.5 * 65536,
|
||||||
transitionTime=2,
|
transitionTime=0,
|
||||||
optionsMask=1,
|
optionsMask=1,
|
||||||
optionsOverride=1,
|
optionsOverride=1,
|
||||||
),
|
),
|
||||||
@ -413,7 +413,7 @@ async def test_extended_color_light(
|
|||||||
command=clusters.ColorControl.Commands.MoveToHueAndSaturation(
|
command=clusters.ColorControl.Commands.MoveToHueAndSaturation(
|
||||||
hue=167,
|
hue=167,
|
||||||
saturation=254,
|
saturation=254,
|
||||||
transitionTime=2,
|
transitionTime=0,
|
||||||
optionsMask=1,
|
optionsMask=1,
|
||||||
optionsOverride=1,
|
optionsOverride=1,
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user