Remove zwave_js transition on individual color channels (#54303)

This commit is contained in:
Chris 2021-08-09 04:21:41 -07:00 committed by Paulus Schoutsen
parent 2a1d2b77a1
commit b21f319b0a
3 changed files with 11 additions and 15 deletions

View File

@ -301,7 +301,7 @@ class ZwaveLight(ZWaveBaseEntity, LightEntity):
# fallback to setting the color(s) one by one if multicolor fails # fallback to setting the color(s) one by one if multicolor fails
# not sure this is needed at all, but just in case # not sure this is needed at all, but just in case
for color, value in colors.items(): for color, value in colors.items():
await self._async_set_color(color, value, zwave_transition) await self._async_set_color(color, value)
async def _async_set_color( async def _async_set_color(
self, self,

View File

@ -1021,8 +1021,7 @@ async def test_multicast_set_value_options(
], ],
ATTR_COMMAND_CLASS: 51, ATTR_COMMAND_CLASS: 51,
ATTR_PROPERTY: "targetColor", ATTR_PROPERTY: "targetColor",
ATTR_PROPERTY_KEY: 2, ATTR_VALUE: '{ "warmWhite": 0, "coldWhite": 0, "red": 255, "green": 0, "blue": 0 }',
ATTR_VALUE: 2,
ATTR_OPTIONS: {"transitionDuration": 1}, ATTR_OPTIONS: {"transitionDuration": 1},
}, },
blocking=True, blocking=True,
@ -1038,9 +1037,11 @@ async def test_multicast_set_value_options(
assert args["valueId"] == { assert args["valueId"] == {
"commandClass": 51, "commandClass": 51,
"property": "targetColor", "property": "targetColor",
"propertyKey": 2,
} }
assert args["value"] == 2 assert (
args["value"]
== '{ "warmWhite": 0, "coldWhite": 0, "red": 255, "green": 0, "blue": 0 }'
)
assert args["options"] == {"transitionDuration": 1} assert args["options"] == {"transitionDuration": 1}
client.async_send_command.reset_mock() client.async_send_command.reset_mock()

View File

@ -267,8 +267,7 @@
"min": 0, "min": 0,
"max": 255, "max": 255,
"label": "Target value (Warm White)", "label": "Target value (Warm White)",
"description": "The target value of the Warm White color.", "description": "The target value of the Warm White color."
"valueChangeOptions": ["transitionDuration"]
} }
}, },
{ {
@ -286,8 +285,7 @@
"min": 0, "min": 0,
"max": 255, "max": 255,
"label": "Target value (Cold White)", "label": "Target value (Cold White)",
"description": "The target value of the Cold White color.", "description": "The target value of the Cold White color."
"valueChangeOptions": ["transitionDuration"]
} }
}, },
{ {
@ -305,8 +303,7 @@
"min": 0, "min": 0,
"max": 255, "max": 255,
"label": "Target value (Red)", "label": "Target value (Red)",
"description": "The target value of the Red color.", "description": "The target value of the Red color."
"valueChangeOptions": ["transitionDuration"]
} }
}, },
{ {
@ -324,8 +321,7 @@
"min": 0, "min": 0,
"max": 255, "max": 255,
"label": "Target value (Green)", "label": "Target value (Green)",
"description": "The target value of the Green color.", "description": "The target value of the Green color."
"valueChangeOptions": ["transitionDuration"]
} }
}, },
{ {
@ -343,8 +339,7 @@
"min": 0, "min": 0,
"max": 255, "max": 255,
"label": "Target value (Blue)", "label": "Target value (Blue)",
"description": "The target value of the Blue color.", "description": "The target value of the Blue color."
"valueChangeOptions": ["transitionDuration"]
} }
}, },
{ {