mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[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:
parent
b8b22555ff
commit
6a33a3fd27
@ -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!");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user