From 277f3c1ce49bd3e714811db078c3ca29d4413892 Mon Sep 17 00:00:00 2001 From: Arne Seime Date: Tue, 25 Jan 2022 20:32:53 +0100 Subject: [PATCH] Typo Signed-off-by: Arne Seime --- .../internal/handler/GroheOndusSenseGuardHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.groheondus/src/main/java/org/openhab/binding/groheondus/internal/handler/GroheOndusSenseGuardHandler.java b/bundles/org.openhab.binding.groheondus/src/main/java/org/openhab/binding/groheondus/internal/handler/GroheOndusSenseGuardHandler.java index 5774e1c63a3b8..5fd24c72db068 100644 --- a/bundles/org.openhab.binding.groheondus/src/main/java/org/openhab/binding/groheondus/internal/handler/GroheOndusSenseGuardHandler.java +++ b/bundles/org.openhab.binding.groheondus/src/main/java/org/openhab/binding/groheondus/internal/handler/GroheOndusSenseGuardHandler.java @@ -111,10 +111,10 @@ protected void updateChannel(ChannelUID channelUID, Appliance appliance, Data da } break; case CHANNEL_WATERCONSUMPTION: - newState = sumWaterCosumption(dataPoint); + newState = sumWaterConsumption(dataPoint); break; case CHANNEL_WATERCONSUMPTION_SINCE_MIDNIGHT: - newState = sumWaterCosumptionSinceMidnight(dataPoint); + newState = sumWaterConsumptionSinceMidnight(dataPoint); break; default: throw new IllegalArgumentException("Channel " + channelUID + " not supported."); @@ -124,7 +124,7 @@ protected void updateChannel(ChannelUID channelUID, Appliance appliance, Data da } } - private QuantityType sumWaterCosumptionSinceMidnight(Data dataPoint) { + private QuantityType sumWaterConsumptionSinceMidnight(Data dataPoint) { ZonedDateTime earliestWithdrawal = ZonedDateTime.now(ZoneId.systemDefault()).truncatedTo(ChronoUnit.DAYS); ZonedDateTime latestWithdrawal = earliestWithdrawal.plus(1, ChronoUnit.DAYS); @@ -135,7 +135,7 @@ private QuantityType sumWaterCosumptionSinceMidnight(Data dataPoint) { return new QuantityType<>(waterConsumption, Units.LITRE); } - private QuantityType sumWaterCosumption(Data dataPoint) { + private QuantityType sumWaterConsumption(Data dataPoint) { Double waterConsumption = dataPoint.getWithdrawals().stream() .mapToDouble(withdrawal -> withdrawal.getWaterconsumption()).sum(); return new QuantityType(waterConsumption, Units.LITRE);