[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:
@@ -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!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user