mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[mybmw] add stop charging command (#16937)
Signed-off-by: Martin Grassl <martin.grassl@digital-filestore.de> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
0e99ef6013
commit
45bbaa3d79
@ -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
|
||||
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
@ -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<CommandOption> l = RemoteServiceUtils.getOptions(true);
|
||||
assertEquals(commandReference, l.toString(), "Commad Options");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user