mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
fix a bug reported by community: https://community.openhab.org/t/easee-binding/135492/58 (#13527)
Signed-off-by: Alexander Friese <af944580@googlemail.com>
This commit is contained in:
parent
3f5bee114d
commit
6a27f17611
@ -150,7 +150,7 @@ public class EaseeBindingConstants {
|
|||||||
public static final String GENERIC_NO = "No";
|
public static final String GENERIC_NO = "No";
|
||||||
public static final int CHARGER_OP_STATE_WAITING = 2;
|
public static final int CHARGER_OP_STATE_WAITING = 2;
|
||||||
public static final int CHARGER_OP_STATE_CHARGING = 3;
|
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 int CHARGER_REASON_FOR_NO_CURRENT_PAUSED = 52;
|
||||||
|
|
||||||
public static final String THING_CONFIG_ID = "id";
|
public static final String THING_CONFIG_ID = "id";
|
||||||
|
@ -81,7 +81,7 @@ class CustomResponseTransformer {
|
|||||||
private void updateChargerStartStop(Map<Channel, State> result, String value, JsonObject rawData) {
|
private void updateChargerStartStop(Map<Channel, State> result, String value, JsonObject rawData) {
|
||||||
Channel channel = channelProvider.getChannel(CHANNEL_GROUP_CHARGER_COMMANDS, CHANNEL_CHARGER_START_STOP);
|
Channel channel = channelProvider.getChannel(CHANNEL_GROUP_CHARGER_COMMANDS, CHANNEL_CHARGER_START_STOP);
|
||||||
if (channel != null) {
|
if (channel != null) {
|
||||||
int val = Integer.valueOf(value);
|
int val = Integer.parseInt(value);
|
||||||
// state >= 3 will mean charging, ready to charge or charging finished
|
// state >= 3 will mean charging, ready to charge or charging finished
|
||||||
boolean charging = val >= CHARGER_OP_STATE_CHARGING;
|
boolean charging = val >= CHARGER_OP_STATE_CHARGING;
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ class CustomResponseTransformer {
|
|||||||
private void updateChargerPauseResume(Map<Channel, State> result, String value) {
|
private void updateChargerPauseResume(Map<Channel, State> result, String value) {
|
||||||
Channel channel = channelProvider.getChannel(CHANNEL_GROUP_CHARGER_COMMANDS, CHANNEL_CHARGER_PAUSE_RESUME);
|
Channel channel = channelProvider.getChannel(CHANNEL_GROUP_CHARGER_COMMANDS, CHANNEL_CHARGER_PAUSE_RESUME);
|
||||||
if (channel != null) {
|
if (channel != null) {
|
||||||
int val = Integer.valueOf(value);
|
double val = Double.parseDouble(value);
|
||||||
// value == 0 will mean paused
|
// value == 0 will mean paused
|
||||||
boolean paused = val == CHARGER_DYNAMIC_CURRENT_PAUSE;
|
boolean paused = val == CHARGER_DYNAMIC_CURRENT_PAUSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user