Signed-off-by: Alexander Friese <af944580@googlemail.com>
This commit is contained in:
alexf2015 2022-10-10 09:28:42 +02:00 committed by GitHub
parent 3f5bee114d
commit 6a27f17611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -150,7 +150,7 @@ public class EaseeBindingConstants {
public static final String GENERIC_NO = "No";
public static final int CHARGER_OP_STATE_WAITING = 2;
public static final int CHARGER_OP_STATE_CHARGING = 3;
public static final int CHARGER_DYNAMIC_CURRENT_PAUSE = 0;
public static final double CHARGER_DYNAMIC_CURRENT_PAUSE = 0;
public static final int CHARGER_REASON_FOR_NO_CURRENT_PAUSED = 52;
public static final String THING_CONFIG_ID = "id";

View File

@ -81,7 +81,7 @@ class CustomResponseTransformer {
private void updateChargerStartStop(Map<Channel, State> result, String value, JsonObject rawData) {
Channel channel = channelProvider.getChannel(CHANNEL_GROUP_CHARGER_COMMANDS, CHANNEL_CHARGER_START_STOP);
if (channel != null) {
int val = Integer.valueOf(value);
int val = Integer.parseInt(value);
// state >= 3 will mean charging, ready to charge or charging finished
boolean charging = val >= CHARGER_OP_STATE_CHARGING;
@ -97,7 +97,7 @@ class CustomResponseTransformer {
private void updateChargerPauseResume(Map<Channel, State> result, String value) {
Channel channel = channelProvider.getChannel(CHANNEL_GROUP_CHARGER_COMMANDS, CHANNEL_CHARGER_PAUSE_RESUME);
if (channel != null) {
int val = Integer.valueOf(value);
double val = Double.parseDouble(value);
// value == 0 will mean paused
boolean paused = val == CHARGER_DYNAMIC_CURRENT_PAUSE;