mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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.kColorTemperature: ColorMode.COLOR_TEMP,
|
||||
}
|
||||
DEFAULT_TRANSITION = 0.2
|
||||
|
||||
# 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.
|
||||
@ -287,7 +286,7 @@ class MatterLight(MatterEntity, LightEntity):
|
||||
xy_color = kwargs.get(ATTR_XY_COLOR)
|
||||
color_temp = kwargs.get(ATTR_COLOR_TEMP)
|
||||
brightness = kwargs.get(ATTR_BRIGHTNESS)
|
||||
transition = kwargs.get(ATTR_TRANSITION, DEFAULT_TRANSITION)
|
||||
transition = kwargs.get(ATTR_TRANSITION, 0)
|
||||
if self._transitions_disabled:
|
||||
transition = 0
|
||||
|
||||
|
@ -159,7 +159,7 @@ async def test_dimmable_light(
|
||||
endpoint_id=1,
|
||||
command=clusters.LevelControl.Commands.MoveToLevelWithOnOff(
|
||||
level=128,
|
||||
transitionTime=2,
|
||||
transitionTime=0,
|
||||
),
|
||||
)
|
||||
matter_client.send_device_command.reset_mock()
|
||||
@ -237,7 +237,7 @@ async def test_color_temperature_light(
|
||||
endpoint_id=1,
|
||||
command=clusters.ColorControl.Commands.MoveToColorTemperature(
|
||||
colorTemperatureMireds=300,
|
||||
transitionTime=2,
|
||||
transitionTime=0,
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
),
|
||||
@ -348,7 +348,7 @@ async def test_extended_color_light(
|
||||
command=clusters.ColorControl.Commands.MoveToColor(
|
||||
colorX=0.5 * 65536,
|
||||
colorY=0.5 * 65536,
|
||||
transitionTime=2,
|
||||
transitionTime=0,
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
),
|
||||
@ -413,7 +413,7 @@ async def test_extended_color_light(
|
||||
command=clusters.ColorControl.Commands.MoveToHueAndSaturation(
|
||||
hue=167,
|
||||
saturation=254,
|
||||
transitionTime=2,
|
||||
transitionTime=0,
|
||||
optionsMask=1,
|
||||
optionsOverride=1,
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user