[deconz] Fix Thermostat setting target temperature (#9189)
Improve logging on sending commands by checking http response status code Signed-off-by: Lukas Agethen <lukas83@gmx.de>
This commit is contained in:
parent
27f280cfa2
commit
d3b9bd592b
|
@ -194,9 +194,14 @@ public abstract class DeconzBaseThingHandler<T extends DeconzBaseMessage> extend
|
|||
if (acceptProcessing != null) {
|
||||
acceptProcessing.run();
|
||||
}
|
||||
logger.trace("Result code={}, body={}", v.getResponseCode(), v.getBody());
|
||||
if (v.getResponseCode() != java.net.HttpURLConnection.HTTP_OK) {
|
||||
logger.warn("Sending command {} to channel {} failed: {} - {}", originalCommand, channelUID,
|
||||
v.getResponseCode(), v.getBody());
|
||||
} else {
|
||||
logger.trace("Result code={}, body={}", v.getResponseCode(), v.getBody());
|
||||
}
|
||||
}).exceptionally(e -> {
|
||||
logger.debug("Sending command {} to channel {} failed: {} - {}", originalCommand, channelUID, e.getClass(),
|
||||
logger.warn("Sending command {} to channel {} failed: {} - {}", originalCommand, channelUID, e.getClass(),
|
||||
e.getMessage());
|
||||
return null;
|
||||
});
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
|
|||
public enum ResourceType {
|
||||
GROUPS("groups", "action"),
|
||||
LIGHTS("lights", "state"),
|
||||
SENSORS("sensors", ""),
|
||||
SENSORS("sensors", "config"),
|
||||
UNKNOWN("", "");
|
||||
|
||||
private static final Map<String, ResourceType> MAPPING = Arrays.stream(ResourceType.values())
|
||||
|
|
Loading…
Reference in New Issue