From 5d86b778c6ecbb10a6453ee0f3d39a9d6d98558d Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Tue, 21 Nov 2023 18:24:59 +0100 Subject: [PATCH] [DSL] Expose ColorUtil methods to DSL rules New functions for RGBW introduced in #3849. Signed-off-by: Holger Friedrich --- .../org/openhab/core/model/script/actions/CoreUtil.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java index 5b35a55387c..084c286ef85 100644 --- a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java +++ b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/CoreUtil.java @@ -36,6 +36,14 @@ public static int hsbTosRgb(HSBType hsb) { return ColorUtil.hsbTosRgb(hsb); } + public static int[] hsbToRgbw(HSBType hsb) { + return ColorUtil.hsbToRgbw(hsb); + } + + public static PercentType[] hsbToRgbwPercent(HSBType hsb) { + return ColorUtil.hsbToRgbwPercent(hsb); + } + public static double[] hsbToXY(HSBType hsb) { return ColorUtil.hsbToXY(hsb); }