mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[miio] onoffpara commandtype fix (#8675)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
parent
7615e5fd09
commit
43be10c204
@ -152,6 +152,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
|
||||
value = new JsonPrimitive(command == OnOffType.ON ? "on" : "off");
|
||||
} else if (paramType == CommandParameterType.ONOFFPARA) {
|
||||
cmd = cmd.replace("*", command == OnOffType.ON ? "on" : "off");
|
||||
value = new JsonArray();
|
||||
} else if (paramType == CommandParameterType.ONOFFBOOL) {
|
||||
boolean boolCommand = command == OnOffType.ON;
|
||||
value = new JsonPrimitive(boolCommand);
|
||||
@ -186,7 +187,8 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
|
||||
value = miotTransform(miIoBasicChannel, value);
|
||||
}
|
||||
}
|
||||
if (paramType != CommandParameterType.NONE && value != null) {
|
||||
if (paramType != CommandParameterType.NONE && paramType != CommandParameterType.ONOFFPARA
|
||||
&& value != null) {
|
||||
if (parameters.size() > 0) {
|
||||
parameters.set(valuePos, value);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user