From 23fc572a620d068d1f0e31e6eacbdcb31b6534d6 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sat, 19 Nov 2022 20:17:46 +0100 Subject: [PATCH] [BasicUI] Consider item state for the color picker (#1547) It was not working if you added a label pattern to your color item Related to discussion in #427 Signed-off-by: Laurent Garnier --- bundles/org.openhab.ui.basic/web-src/smarthome.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.ui.basic/web-src/smarthome.js b/bundles/org.openhab.ui.basic/web-src/smarthome.js index d7cae6996..a3711d5d2 100644 --- a/bundles/org.openhab.ui.basic/web-src/smarthome.js +++ b/bundles/org.openhab.ui.basic/web-src/smarthome.js @@ -1332,9 +1332,9 @@ _t.longPress = false; _t.pressed = false; - _t.setValue = function(value) { + _t.setValue = function(value, itemState) { var - t = value.split(","), + t = itemState.split(","), hsv = { h: t[0] / 360, s: t[1] / 100,