[miio] send miot actions parameter as jsonObject (#9056)
* [miio] send miot actions parameter as jsonObject * [miio] avoid maven error Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>pull/9072/head
parent
754daa0140
commit
d86edfe32b
|
@ -227,7 +227,13 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
|
|||
parameters.add(value);
|
||||
}
|
||||
}
|
||||
if (action.isMiOtAction() && parameters.size() > 0 && parameters.get(0).isJsonObject()) {
|
||||
// hack as unlike any other commands miot actions parameters appear to be send as a json object
|
||||
// instead of a json array
|
||||
cmd = cmd + parameters.get(0).getAsJsonObject().toString();
|
||||
} else {
|
||||
cmd = cmd + parameters.toString();
|
||||
}
|
||||
if (value != null) {
|
||||
logger.debug("Sending command {}", cmd);
|
||||
sendCommand(cmd);
|
||||
|
|
Loading…
Reference in New Issue