Skip to content

Commit

Permalink
API change on duration channels (#17528)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Weger <weger.michael@gmx.net>
  • Loading branch information
MikeTheTux authored Oct 8, 2024
1 parent 09db08e commit 18ae995
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -758,15 +758,15 @@ 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);
updateState(channel, new QuantityType<>(chargePower, Units.WATT));

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);
Expand All @@ -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);
Expand Down

0 comments on commit 18ae995

Please sign in to comment.