From c0d32852d4b412a906fd5b66c786792e4d4e9309 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Wed, 21 Dec 2022 12:21:53 -0700 Subject: [PATCH] [dali] tweak color temperature abs QuantityType fix (#14029) adds an example of usage of the channel to the README, and simplifies one method call Signed-off-by: Cody Cutrer --- bundles/org.openhab.binding.dali/README.md | 1 + .../binding/dali/internal/handler/DaliDt8DeviceHandler.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.dali/README.md b/bundles/org.openhab.binding.dali/README.md index 2549b5d90e141..9a77badbc19cf 100644 --- a/bundles/org.openhab.binding.dali/README.md +++ b/bundles/org.openhab.binding.dali/README.md @@ -82,5 +82,6 @@ Bridge dali:daliserver:237dbae7 "Daliserver" [ host="localhost", port=55825] { ```java Dimmer WarmWhiteLivingRoom "Warm White Living Room" {channel="dali:device:237dbae7:995e16ca-07c4-4111-9cda-504cb5120f82:dimImmediately"} Color ColorLivingRoom "Light Color Living Room" {channel="dali:device:237dbae7:87bf0403-a45d-4037-b874-28f4ece30004:color"} +Number:Temperature ColorTemperatureLivingRoom "Light Color Temperature Living Room [%d K]" {channel="dali:device:237dbae7:87bf0403-a45d-4037-b874-28f4ece30004:color-temperature-abs"} Switch LightsLivingRoom "Lights Living Room On/Off" {channel="dali:device:237dbae7:31da8dac-8e09-455a-bc7a-6ed70f740001:dimImmediately"} ``` diff --git a/bundles/org.openhab.binding.dali/src/main/java/org/openhab/binding/dali/internal/handler/DaliDt8DeviceHandler.java b/bundles/org.openhab.binding.dali/src/main/java/org/openhab/binding/dali/internal/handler/DaliDt8DeviceHandler.java index c0b17d1c4e9a0..1d387d74b2c42 100644 --- a/bundles/org.openhab.binding.dali/src/main/java/org/openhab/binding/dali/internal/handler/DaliDt8DeviceHandler.java +++ b/bundles/org.openhab.binding.dali/src/main/java/org/openhab/binding/dali/internal/handler/DaliDt8DeviceHandler.java @@ -76,7 +76,7 @@ public void handleCommand(ChannelUID channelUID, Command command) { logger.warn("Unable to convert command {} to mireks", command); return; } - mirek = commandQuantity.toBigDecimal().intValue(); + mirek = commandQuantity.intValue(); } else { logger.warn("Unable to convert command {} to mireks", command); return;