Skip to content

Commit d41a44b

Browse files
committed
code cleanup
1 parent d5494c1 commit d41a44b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/org/openhab/binding/yeelight/internal/YeelightBinding.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ protected void execute() {
319319
}
320320

321321
private void processYeelightResult(YeelightGetPropsResponse result, String action, String itemName) {
322-
//JsonObject jo = parser.parse(result).getAsJsonObject();
323322
State newState = null;
324323
State oldState = null;
325324
try {
@@ -431,7 +430,7 @@ protected void internalReceiveCommand(String itemName, Command command) {
431430

432431
private YeelightGetPropsResponse sendYeelightGetPropCommand(String location) {
433432
String result = sendYeelightCommand(location, GET_PROP, new Object[]{"power", "bright", "ct", "hue", "sat", "rgb", "nl_br"});
434-
logger.info("location: {}, props: {}", location, result);
433+
logger.debug("location: {}, props: {}", location, result);
435434
return gson.fromJson(result, YeelightGetPropsResponse.class);
436435
}
437436

@@ -477,13 +476,13 @@ private String sendYeelightCommand(String location, String action, Object[] para
477476
DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());
478477
BufferedReader inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
479478
String sentence = "{\"id\":" + msgid++ + ",\"method\":\"" + action + "\",\"params\":[" + getProperties(params) + "]}\r\n";
480-
logger.debug("Sending sentence: " + sentence);
479+
logger.debug("Sending sentence: {}", sentence);
481480
outToServer.writeBytes(sentence);
482481
return inFromServer.readLine();
483482
} catch (NoRouteToHostException e) {
484483
logger.debug("Location {} is probably offline", location);
485484
if (action.equals(GET_PROP)) {
486-
//update switches of not found location to OFF state
485+
//update switches if not found location to OFF state
487486
for (Object item : getOnSwitchItems(location)) {
488487
eventPublisher.postUpdate((String) item, OnOffType.OFF);
489488
}

0 commit comments

Comments
 (0)