[goecharger] Fix compatibility with go-eCharger V3 (#12733)
Also avoid the thing to remain in state UNKNOWN if the decoding of the JSON response is failing. Fix #12719 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
78813efbd2
commit
cff0629fdd
|
@ -34,7 +34,7 @@ public class GoEStatusResponseV2DTO extends GoEStatusResponseBaseDTO {
|
||||||
public Double[] temperatures;
|
public Double[] temperatures;
|
||||||
|
|
||||||
@SerializedName("wh")
|
@SerializedName("wh")
|
||||||
public Long sessionChargeConsumption;
|
public Double sessionChargeConsumption;
|
||||||
|
|
||||||
@SerializedName("dwo")
|
@SerializedName("dwo")
|
||||||
public Double sessionChargeConsumptionLimit;
|
public Double sessionChargeConsumptionLimit;
|
||||||
|
|
|
@ -142,7 +142,7 @@ public abstract class GoEChargerBaseHandler extends BaseThingHandler {
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
updateChannelsAndStatus(null, ie.getMessage());
|
updateChannelsAndStatus(null, ie.getMessage());
|
||||||
} catch (TimeoutException | ExecutionException e) {
|
} catch (TimeoutException | ExecutionException | JsonSyntaxException e) {
|
||||||
updateChannelsAndStatus(null, e.getMessage());
|
updateChannelsAndStatus(null, e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue