mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-26 15:21:41 +01:00
API change on duration channels (#17528)
Signed-off-by: Michael Weger <weger.michael@gmx.net>
This commit is contained in:
parent
b1bc1037d5
commit
c6fab65813
@ -758,7 +758,7 @@ public class EvccHandler extends BaseThingHandler {
|
|||||||
|
|
||||||
long chargeDuration = loadpoint.getChargeDuration();
|
long chargeDuration = loadpoint.getChargeDuration();
|
||||||
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_DURATION);
|
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();
|
float chargePower = loadpoint.getChargePower();
|
||||||
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_POWER);
|
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_POWER);
|
||||||
@ -766,7 +766,7 @@ public class EvccHandler extends BaseThingHandler {
|
|||||||
|
|
||||||
long chargeRemainingDuration = loadpoint.getChargeRemainingDuration();
|
long chargeRemainingDuration = loadpoint.getChargeRemainingDuration();
|
||||||
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_REMAINING_DURATION);
|
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();
|
float chargeRemainingEnergy = loadpoint.getChargeRemainingEnergy();
|
||||||
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_REMAINING_ENERGY);
|
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CHARGE_REMAINING_ENERGY);
|
||||||
@ -786,7 +786,7 @@ public class EvccHandler extends BaseThingHandler {
|
|||||||
|
|
||||||
long connectedDuration = loadpoint.getConnectedDuration();
|
long connectedDuration = loadpoint.getConnectedDuration();
|
||||||
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_CONNECTED_DURATION);
|
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();
|
boolean enabled = loadpoint.getEnabled();
|
||||||
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_ENABLED);
|
channel = new ChannelUID(uid, channelGroup, CHANNEL_LOADPOINT_ENABLED);
|
||||||
|
Loading…
Reference in New Issue
Block a user