[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>
This commit is contained in:
parent
754daa0140
commit
d86edfe32b
@ -227,7 +227,13 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
|
|||||||
parameters.add(value);
|
parameters.add(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmd = cmd + parameters.toString();
|
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) {
|
if (value != null) {
|
||||||
logger.debug("Sending command {}", cmd);
|
logger.debug("Sending command {}", cmd);
|
||||||
sendCommand(cmd);
|
sendCommand(cmd);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user