]> git.basschouten.com Git - openhab-addons.git/commitdiff
[dali] tweak color temperature abs QuantityType fix (#14029)
authorCody Cutrer <cody@cutrer.us>
Wed, 21 Dec 2022 19:21:53 +0000 (12:21 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Dec 2022 19:21:53 +0000 (20:21 +0100)
adds an example of usage of the channel to the README, and
simplifies one method call

Signed-off-by: Cody Cutrer <cody@cutrer.us>
bundles/org.openhab.binding.dali/README.md
bundles/org.openhab.binding.dali/src/main/java/org/openhab/binding/dali/internal/handler/DaliDt8DeviceHandler.java

index 2549b5d90e1411a872e2f6a3847aacd645154786..9a77badbc19cf9d2a4061d42dacfd68e39647d27 100644 (file)
@@ -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"}
 ```
index c0b17d1c4e9a033a51223194c57b9aabad296465..1d387d74b2c42c877b8a731cc1fba7ad7e38d100 100644 (file)
@@ -76,7 +76,7 @@ public class DaliDt8DeviceHandler extends DaliDeviceHandler {
                         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;