API change on duration channels (#17528)

Signed-off-by: Michael Weger <weger.michael@gmx.net>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
MikeTheTux 2024-10-08 21:08:19 +02:00 committed by Ciprian Pascu
parent 6c44d45f1c
commit 1af4bf2970

View File

@ -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);