*/
public Result getResult() throws EvccApiException {
final String response = httpRequest(this.host + EVCC_REST_API + "state", "GET");
+ logger.trace("API Response >> {}", response);
try {
Status status = gson.fromJson(response, Status.class);
if (status == null) {
*/
package org.openhab.binding.evcc.internal.api.dto;
+import java.util.HashMap;
import java.util.Map;
+import java.util.Map.Entry;
import com.google.gson.annotations.SerializedName;
}
public Map<String, Vehicle> getVehicles() {
- return vehicles;
+ Map<String, Vehicle> correctedMap = new HashMap<>();
+ for (Entry<String, Vehicle> entry : vehicles.entrySet()) {
+ // The key from the vehicles map is used as uid, so it should not contain semicolons.
+ correctedMap.put(entry.getKey().replace(":", "-"), entry.getValue());
+ }
+ return correctedMap;
}
/**