Set Philips hue to color mode with homey script

Hello,

I am trying to set my Philips Hue bulb to color mode.

I check the status of my device with…
log(device.capabilitiesObj.light_mode);

When I am not in color mode, I get the following (which is fine):
{
value: ‘temperature’,
lastUpdated: ‘2021-12-29T20:43:29.670Z’,
type: ‘enum’,
getable: true,
setable: true,
title: ‘Light mode’,
desc: ‘Switch between color or temperature mode’,
units: null,
values: [
{ id: ‘color’, title: ‘Color’ },
{ id: ‘temperature’, title: ‘Temperature’ }
],
id: ‘light_mode’,
options: {}
}

But, when my device is in color mode, I get …
{
value: null,
lastUpdated: ‘2021-12-29T20:43:25.647Z’,
type: ‘enum’,
getable: true,
setable: true,
title: ‘Light mode’,
desc: ‘Switch between color or temperature mode’,
units: null,
values: [
{ id: ‘color’, title: ‘Color’ },
{ id: ‘temperature’, title: ‘Temperature’ }
],
id: ‘light_mode’,
options: {}
}

The attribute value should be set to ‘color’ as described in the enum, but it is not the case.

If I try to set the mode to ‘color’ with script, it doesn’t work.
device.setCapabilityValue(‘light_mode’, ‘color’);

Any idea ?

Thank you in advance.

Chris