From 6a33a3fd27b3a5bd5dee4500a41146d3f422e5e5 Mon Sep 17 00:00:00 2001 From: Ondrej Pecta Date: Mon, 18 Oct 2021 20:50:43 +0200 Subject: [PATCH] [orbitbhyve] fixed updating of watering time channel (#11388) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ondrej Pecta Co-authored-by: Ondřej Pečta --- .../internal/handler/OrbitBhyveSprinklerHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.orbitbhyve/src/main/java/org/openhab/binding/orbitbhyve/internal/handler/OrbitBhyveSprinklerHandler.java b/bundles/org.openhab.binding.orbitbhyve/src/main/java/org/openhab/binding/orbitbhyve/internal/handler/OrbitBhyveSprinklerHandler.java index 546aeb84281..62641c24f81 100644 --- a/bundles/org.openhab.binding.orbitbhyve/src/main/java/org/openhab/binding/orbitbhyve/internal/handler/OrbitBhyveSprinklerHandler.java +++ b/bundles/org.openhab.binding.orbitbhyve/src/main/java/org/openhab/binding/orbitbhyve/internal/handler/OrbitBhyveSprinklerHandler.java @@ -85,7 +85,6 @@ public class OrbitBhyveSprinklerHandler extends BaseThingHandler { final QuantityType value = ((QuantityType) command).toUnit(Units.MINUTE); if (value != null) { wateringTime = value.intValue(); - updateState(CHANNEL_WATERING_TIME, new DecimalType(wateringTime)); } return; } @@ -168,7 +167,7 @@ public class OrbitBhyveSprinklerHandler extends BaseThingHandler { } } - updateState(CHANNEL_WATERING_TIME, new DecimalType(wateringTime)); + updateState(CHANNEL_WATERING_TIME, new QuantityType<>(wateringTime, Units.MINUTE)); logger.debug("Finished initializing of sprinkler!"); } }