From 18ae995f5915f93f5451360f2d4bc00f6cfedb85 Mon Sep 17 00:00:00 2001 From: MikeTheTux <44850211+MikeTheTux@users.noreply.github.com> Date: Tue, 8 Oct 2024 21:08:19 +0200 Subject: [PATCH] API change on duration channels (#17528) Signed-off-by: Michael Weger --- .../java/org/openhab/binding/evcc/internal/EvccHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.evcc/src/main/java/org/openhab/binding/evcc/internal/EvccHandler.java b/bundles/org.openhab.binding.evcc/src/main/java/org/openhab/binding/evcc/internal/EvccHandler.java index bf60d17e22d90..a7fa9e554874c 100644 --- a/bundles/org.openhab.binding.evcc/src/main/java/org/openhab/binding/evcc/internal/EvccHandler.java +++ b/bundles/org.openhab.binding.evcc/src/main/java/org/openhab/binding/evcc/internal/EvccHandler.java @@ -758,7 +758,7 @@ private void updateChannelsLoadpoint(int loadpointId) { long chargeDuration = loadpoint.getChargeDuration(); channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_DURATION); - updateState(channel, new QuantityType<>(chargeDuration, MetricPrefix.NANO(Units.SECOND))); + updateState(channel, new QuantityType<>(chargeDuration, Units.SECOND)); float chargePower = loadpoint.getChargePower(); channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_POWER); @@ -766,7 +766,7 @@ private void updateChannelsLoadpoint(int loadpointId) { long chargeRemainingDuration = loadpoint.getChargeRemainingDuration(); channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_REMAINING_DURATION); - updateState(channel, new QuantityType<>(chargeRemainingDuration, MetricPrefix.NANO(Units.SECOND))); + updateState(channel, new QuantityType<>(chargeRemainingDuration, Units.SECOND)); float chargeRemainingEnergy = loadpoint.getChargeRemainingEnergy(); channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_REMAINING_ENERGY); @@ -786,7 +786,7 @@ private void updateChannelsLoadpoint(int loadpointId) { long connectedDuration = loadpoint.getConnectedDuration(); channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CONNECTED_DURATION); - updateState(channel, new QuantityType<>(connectedDuration, MetricPrefix.NANO(Units.SECOND))); + updateState(channel, new QuantityType<>(connectedDuration, Units.SECOND)); boolean enabled = loadpoint.getEnabled(); channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_ENABLED);