[orbitbhyve] fixed updating of watering time channel (#11388)

Signed-off-by: Ondrej Pecta <opecta@gmail.com>

Co-authored-by: Ondřej Pečta <pecta@Ondrej-MacBook-Pro.local>
This commit is contained in:
Ondrej Pecta 2021-10-18 20:50:43 +02:00 committed by GitHub
parent b8b22555ff
commit 6a33a3fd27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,6 @@ public class OrbitBhyveSprinklerHandler extends BaseThingHandler {
final QuantityType<?> value = ((QuantityType<?>) command).toUnit(Units.MINUTE); final QuantityType<?> value = ((QuantityType<?>) command).toUnit(Units.MINUTE);
if (value != null) { if (value != null) {
wateringTime = value.intValue(); wateringTime = value.intValue();
updateState(CHANNEL_WATERING_TIME, new DecimalType(wateringTime));
} }
return; 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!"); logger.debug("Finished initializing of sprinkler!");
} }
} }