Enable the HueSaturation on ExtendedColorLightDevice #1013
-
Hello everyone ! I am facing an issue, I am trying to enable the HueSaturation on the ExtendedColorLightDevice by taking exemple on the #996 discussion but it doesn't work at all for me. When I add the code: I have this error: Have you any idea how to resolve this ? Thank you for your help ! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
I made a mistake on what I give you, here is the correct code: const endpoint = new Endpoint(
MatterBridgeLightEndpoint.with(ExtendedColorLightRequirements.ColorControlServer.with('HueSaturation')),
{
id: 'LightDimmerColor',
onOff: {
onOff: false,
},
levelControl: {
currentLevel: 254,
options: {
executeIfOff: true,
},
},
colorControl: {
startUpColorTemperatureMireds: 370,
coupleColorTempToLevelMinMireds: 157,
},
},
) |
Beta Was this translation helpful? Give feedback.
-
Found the answer, I have a to desactivate exactOptionalPropertyTypes on my tsconfig
|
Beta Was this translation helpful? Give feedback.
-
What is MatterBridgeLightEndpoint? Cna oyu please show the fiull info? Normally this tsconfig setting should not be needed. When I do const endpoint = new Endpoint(
ExtendedColorLightDevice.with(ExtendedColorLightRequirements.ColorControlServer.with("HueSaturation")),
{
id: "LightDimmerColor",
onOff: {
onOff: false,
},
levelControl: {
currentLevel: 254,
options: {
executeIfOff: true,
},
},
colorControl: {
// startUpColorTemperatureMireds: 370,
// coupleColorTempToLevelMinMireds: 157,
},
},
); Then TS only tells me that the two "Mireds" attrinutes you add in the defaults are not allowed because when you just enable HueSaturation feature then the ColorTemperature settings are not allowed |
Beta Was this translation helpful? Give feedback.
Found the answer, I have a to desactivate exactOptionalPropertyTypes on my tsconfig