Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[evcc] Fix API change on duration channels #17528

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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