Signed-off-by: Ondrej Pecta <opecta@gmail.com>
Co-authored-by: Ondřej Pečta <pecta@Ondrej-MacBook-Pro.local>
final QuantityType<?> value = ((QuantityType<?>) command).toUnit(Units.MINUTE);
if (value != null) {
wateringTime = value.intValue();
- updateState(CHANNEL_WATERING_TIME, new DecimalType(wateringTime));
}
return;
}
}
}
- updateState(CHANNEL_WATERING_TIME, new DecimalType(wateringTime));
+ updateState(CHANNEL_WATERING_TIME, new QuantityType<>(wateringTime, Units.MINUTE));
logger.debug("Finished initializing of sprinkler!");
}
}