diff --git a/app/lib/api/v2/hue-api-v2.ts b/app/lib/api/v2/hue-api-v2.ts index 62bc549c..3fe33fe5 100644 --- a/app/lib/api/v2/hue-api-v2.ts +++ b/app/lib/api/v2/hue-api-v2.ts @@ -109,6 +109,14 @@ export const stopTestPutLights = () => { const lock = new AsyncLock({ timeout: 5000 }) export const putLight = async (light: HueIdentifiable, message: PutLight) => { + + if (message.color && message.color_temperature) { + log.warn("Both color and color_temperature set, put is likely to fail", { + light, + message + }) + } + const [resolveResult, promise] = resolvable() lock.acquire("put", async (done) => { if (testPutLights) { diff --git a/app/lib/put/put-handler.ts b/app/lib/put/put-handler.ts index e13b922f..0b1c3c93 100644 --- a/app/lib/put/put-handler.ts +++ b/app/lib/put/put-handler.ts @@ -17,6 +17,13 @@ export const putMessage = async (resource: HueIdentifiable, message: Buffer) => else { const newResource = toLight(resource, lightMsg) + if (newResource.color && newResource.color_temperature) { + log.warn("PUT Handler: Both color and color_temperature set, put is likely to fail", { + newResource, + message + }) + } + // resource will be updated by the Hue SSE API try { await putLightResource(newResource)