-
Couldn't load subscription status.
- Fork 4
Open
Description
I have multiple lamps grouped in a device set. When i try the following code:
const client = await getDirigeraClient();
const attributes = {
lightLevel: 20,
colorHue: 100,
colorSaturation: 1,
};
const sets = (await client.deviceSets.list()).filter((set) => set.name === "Lamps");
await client.deviceSets.setAttributes({
id: sets[0].id,
attributes,
transitionTime: 1000,
});Only the first attribute (in this case lightLevel) is updated. The hue and saturation remains unchanged.
When i swap the attribute order:
const attributes = {
colorHue: 100,
lightLevel: 20,
colorSaturation: 1,
};Only hue is updated.
To my understanding in the API documentation, one should be able to update multiple attributes at once, right?
In your code, you send the whole attributes object, so i am assuming it is a limitation by the Dirigera hub.
In this case, maybe the setAttributes function should be improved, to only accept one attribute and one value.
Or am i misusing the function? Cheers!
Metadata
Metadata
Assignees
Labels
No labels