From 67e12f5e7679f83ecd56f9bde42822c213633e8b Mon Sep 17 00:00:00 2001 From: jaeichel Date: Thu, 24 Feb 2022 01:54:49 -0500 Subject: [PATCH] Disable xy if colormode is not xy --- .../plugin/js/philips/meethue.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/com.elgato.philips-hue.sdPlugin/plugin/js/philips/meethue.js b/Sources/com.elgato.philips-hue.sdPlugin/plugin/js/philips/meethue.js index 91a5c38..cb0fb52 100644 --- a/Sources/com.elgato.philips-hue.sdPlugin/plugin/js/philips/meethue.js +++ b/Sources/com.elgato.philips-hue.sdPlugin/plugin/js/philips/meethue.js @@ -151,10 +151,10 @@ function Bridge(ip = null, id = null, username = null) { let value = result[key]; if (type === 'light') { - objects.push(new Light(instance, key, value.name, value.type, value.state.on, value.state.bri, value.state.xy, value.state.ct)); + objects.push(new Light(instance, key, value.name, value.type, value.state.on, value.state.bri, value.state.colormode == 'xy' ? value.state.xy : null, value.state.ct)); } else if (type === 'group') { - objects.push(new Group(instance, key, value.name, value.type, value.state.all_on, value.action.bri, value.action.xy, value.action.ct)); + objects.push(new Group(instance, key, value.name, value.type, value.state.all_on, value.action.bri, value.action.colormode == 'xy' ? value.action.xy : null, value.action.ct)); } else if (type === 'scene') { objects.push(new Scene(instance, key, value.name, value.type, value.group));