mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
[miio] sending device in MiIoSendCommand (#11475)
* [miio] sending device in MiIoSendCommand Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] spotless reformatting Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
parent
f9ee7399ba
commit
8b1eabe166
@ -30,6 +30,7 @@ public class MiIoSendCommand {
|
||||
private final int id;
|
||||
private final MiIoCommand command;
|
||||
private final JsonObject commandJson;
|
||||
private final String sender;
|
||||
private @Nullable JsonObject response;
|
||||
private String cloudServer = "";
|
||||
|
||||
@ -37,17 +38,19 @@ public class MiIoSendCommand {
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand) {
|
||||
public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand, String sender) {
|
||||
this.id = id;
|
||||
this.command = command;
|
||||
this.commandJson = fullCommand;
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand, String cloudServer) {
|
||||
public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand, String cloudServer, String sender) {
|
||||
this.id = id;
|
||||
this.command = command;
|
||||
this.commandJson = fullCommand;
|
||||
this.cloudServer = cloudServer;
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
@ -102,4 +105,8 @@ public class MiIoSendCommand {
|
||||
public void setCloudServer(String cloudServer) {
|
||||
this.cloudServer = cloudServer;
|
||||
}
|
||||
|
||||
public String getSender() {
|
||||
return sender;
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ public class MiIoAsyncCommunication {
|
||||
fullCommand.add("params", JsonParser.parseString(params));
|
||||
}
|
||||
MiIoSendCommand sendCmd = new MiIoSendCommand(cmdId, MiIoCommand.getCommand(command), fullCommand,
|
||||
cloudServer);
|
||||
cloudServer, sender);
|
||||
concurrentLinkedQueue.add(sendCmd);
|
||||
if (logger.isDebugEnabled()) {
|
||||
// Obfuscate part of the token to allow sharing of the logfiles
|
||||
|
Loading…
Reference in New Issue
Block a user