mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
This commit is contained in:
parent
c709f52d66
commit
5477fa5fb1
@ -128,8 +128,8 @@ public class TelldusLiveBridgeHandler extends BaseBridgeHandler implements Telld
|
||||
private synchronized void updateDevices(TellstickNetDevices previouslist) throws TellstickException {
|
||||
TellstickNetDevices newList = controller.callRestMethod(TelldusLiveDeviceController.HTTP_TELLDUS_DEVICES,
|
||||
TellstickNetDevices.class);
|
||||
logger.debug("Device list {}", newList.getDevices());
|
||||
if (newList.getDevices() != null) {
|
||||
logger.debug("Device list {}", newList.getDevices());
|
||||
if (previouslist == null) {
|
||||
logger.debug("updateDevices, Creating devices.");
|
||||
for (TellstickNetDevice device : newList.getDevices()) {
|
||||
@ -172,6 +172,8 @@ public class TelldusLiveBridgeHandler extends BaseBridgeHandler implements Telld
|
||||
device.setUpdated(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.debug("updateDevices, rest API returned null");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,8 +111,8 @@ public class TelldusLocalBridgeHandler extends BaseBridgeHandler implements Tell
|
||||
throws TellstickException, InterruptedException {
|
||||
TellstickLocalDevicesDTO newList = controller
|
||||
.callRestMethod(TelldusLocalDeviceController.HTTP_LOCAL_API_DEVICES, TellstickLocalDevicesDTO.class);
|
||||
logger.debug("Device list {}", newList.getDevices());
|
||||
if (newList.getDevices() != null) {
|
||||
logger.debug("Device list {}", newList.getDevices());
|
||||
if (previouslist == null) {
|
||||
for (TellstickLocalDeviceDTO device : newList.getDevices()) {
|
||||
device.setUpdated(true);
|
||||
@ -158,6 +158,8 @@ public class TelldusLocalBridgeHandler extends BaseBridgeHandler implements Tell
|
||||
device.setUpdated(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.debug("updateDevices, rest API returned null");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user