Skip to content

Commit

Permalink
[orbitbhyve] fixed updating of watering time channel (#11388)
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Pecta <opecta@gmail.com>

Co-authored-by: Ondřej Pečta <pecta@Ondrej-MacBook-Pro.local>
  • Loading branch information
octa22 and Ondřej Pečta authored Oct 18, 2021
1 parent b8b2255 commit 6a33a3f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public void handleCommand(ChannelUID channelUID, Command command) {
final QuantityType<?> value = ((QuantityType<?>) command).toUnit(Units.MINUTE);
if (value != null) {
wateringTime = value.intValue();
updateState(CHANNEL_WATERING_TIME, new DecimalType(wateringTime));
}
return;
}
Expand Down Expand Up @@ -168,7 +167,7 @@ private synchronized void doInit() {
}
}

updateState(CHANNEL_WATERING_TIME, new DecimalType(wateringTime));
updateState(CHANNEL_WATERING_TIME, new QuantityType<>(wateringTime, Units.MINUTE));
logger.debug("Finished initializing of sprinkler!");
}
}
Expand Down

0 comments on commit 6a33a3f

Please sign in to comment.