Merge branch 'feature-BOX一期' of http://47.99.132.106:10081/wulin/qiuguo-iot into feature-BOX一期
This commit is contained in:
commit
8b35c9b3f3
@ -61,7 +61,7 @@ public class TuyaDeviceService {
|
||||
}
|
||||
JSONObject deviceInfo = jsonArray.getJSONObject(0);
|
||||
if (Objects.equals(deviceInfo.getBoolean("is_online"), false) && !Objects.equals(data.getMatchingFields(),
|
||||
"开关")) {
|
||||
"开")) {
|
||||
return Mono.just(false);
|
||||
}
|
||||
JSONObject commands = new JSONObject();
|
||||
@ -69,7 +69,7 @@ public class TuyaDeviceService {
|
||||
String type = data.getType();
|
||||
jsonObject.put("code", data.getCode());
|
||||
if (type.equalsIgnoreCase("boolean")) {
|
||||
jsonObject.put("value", data.getValue());
|
||||
jsonObject.put("value", Boolean.parseBoolean(data.getValue()));
|
||||
} else if (type.equalsIgnoreCase("Integer")) {
|
||||
jsonObject.put("value", Integer.parseInt(data.getValue()));
|
||||
} else if (type.equalsIgnoreCase("Enum")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user