diff --git a/bundles/org.openhab.binding.mybmw/README.md b/bundles/org.openhab.binding.mybmw/README.md index c1c1c30e912..6f74d1b64de 100644 --- a/bundles/org.openhab.binding.mybmw/README.md +++ b/bundles/org.openhab.binding.mybmw/README.md @@ -381,7 +381,8 @@ The channel _command_ provides options - _horn-blow_ - _climate-now-start_ - _climate-now-stop_ -- _charge-now_ +- _start-charging_ +- _stop-charging_ The channel _state_ shows the progress of the command execution in the following order diff --git a/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/MyBMWConstants.java b/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/MyBMWConstants.java index 33664482b4e..48676b4a3b1 100644 --- a/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/MyBMWConstants.java +++ b/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/MyBMWConstants.java @@ -220,7 +220,8 @@ public interface MyBMWConstants { static final String REMOTE_SERVICE_HORN = "horn-blow"; static final String REMOTE_SERVICE_AIR_CONDITIONING_START = "climate-now-start"; static final String REMOTE_SERVICE_AIR_CONDITIONING_STOP = "climate-now-stop"; - static final String REMOTE_SERVICE_CHARGE = "charge-now"; + static final String REMOTE_SERVICE_START_CHARGING = "start-charging"; + static final String REMOTE_SERVICE_STOP_CHARGING = "stop-charging"; static final String REMOTE_SERVICE_COMMAND = "command"; static final String REMOTE_STATE = "state"; diff --git a/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/handler/enums/RemoteService.java b/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/handler/enums/RemoteService.java index 2992d460a96..e64a9eda022 100644 --- a/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/handler/enums/RemoteService.java +++ b/bundles/org.openhab.binding.mybmw/src/main/java/org/openhab/binding/mybmw/internal/handler/enums/RemoteService.java @@ -14,11 +14,12 @@ package org.openhab.binding.mybmw.internal.handler.enums; import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_AIR_CONDITIONING_START; import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_AIR_CONDITIONING_STOP; -import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_CHARGE; import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_DOOR_LOCK; import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_DOOR_UNLOCK; import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_HORN; import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_LIGHT_FLASH; +import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_START_CHARGING; +import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_STOP_CHARGING; import static org.openhab.binding.mybmw.internal.MyBMWConstants.REMOTE_SERVICE_VEHICLE_FINDER; import org.eclipse.jdt.annotation.NonNullByDefault; @@ -39,7 +40,8 @@ public enum RemoteService { HORN_BLOW("Horn Blow", REMOTE_SERVICE_HORN, REMOTE_SERVICE_HORN, ""), CLIMATE_NOW_START("Start Climate", REMOTE_SERVICE_AIR_CONDITIONING_START, "climate-now", "{\"action\": \"START\"}"), CLIMATE_NOW_STOP("Stop Climate", REMOTE_SERVICE_AIR_CONDITIONING_STOP, "climate-now", "{\"action\": \"STOP\"}"), - CHARGE_NOW("Charge", REMOTE_SERVICE_CHARGE, "start-charging", ""); + START_CHARGING("Start Charging", REMOTE_SERVICE_START_CHARGING, "start-charging", ""), + STOP_CHARGING("Stop Charging", REMOTE_SERVICE_STOP_CHARGING, "stop-charging", ""); private final String label; private final String id; diff --git a/bundles/org.openhab.binding.mybmw/src/test/java/org/openhab/binding/mybmw/internal/dto/VehiclePropertiesTest.java b/bundles/org.openhab.binding.mybmw/src/test/java/org/openhab/binding/mybmw/internal/dto/VehiclePropertiesTest.java index e0422b7fe71..ddf822f2f4f 100644 --- a/bundles/org.openhab.binding.mybmw/src/test/java/org/openhab/binding/mybmw/internal/dto/VehiclePropertiesTest.java +++ b/bundles/org.openhab.binding.mybmw/src/test/java/org/openhab/binding/mybmw/internal/dto/VehiclePropertiesTest.java @@ -39,7 +39,7 @@ public class VehiclePropertiesTest { @Test public void testRemoteServiceOptions() { - String commandReference = "[CommandOption [command=light-flash, label=Flash Lights], CommandOption [command=vehicle-finder, label=Vehicle Finder], CommandOption [command=door-lock, label=Door Lock], CommandOption [command=door-unlock, label=Door Unlock], CommandOption [command=horn-blow, label=Horn Blow], CommandOption [command=climate-now-start, label=Start Climate], CommandOption [command=climate-now-stop, label=Stop Climate], CommandOption [command=charge-now, label=Charge]]"; + String commandReference = "[CommandOption [command=light-flash, label=Flash Lights], CommandOption [command=vehicle-finder, label=Vehicle Finder], CommandOption [command=door-lock, label=Door Lock], CommandOption [command=door-unlock, label=Door Unlock], CommandOption [command=horn-blow, label=Horn Blow], CommandOption [command=climate-now-start, label=Start Climate], CommandOption [command=climate-now-stop, label=Stop Climate], CommandOption [command=start-charging, label=Start Charging], CommandOption [command=stop-charging, label=Stop Charging]]"; List l = RemoteServiceUtils.getOptions(true); assertEquals(commandReference, l.toString(), "Commad Options"); }