From 1af4bf29704fa4961032983ff12c16fa9065d9b0 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 Signed-off-by: Ciprian Pascu --- .../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 bf60d17e22d..a7fa9e55487 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 @@ public class EvccHandler extends BaseThingHandler { 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 @@ public class EvccHandler extends BaseThingHandler { 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 @@ public class EvccHandler extends BaseThingHandler { 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);