mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-02-04 03:14:07 +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 {
|
private synchronized void updateDevices(TellstickNetDevices previouslist) throws TellstickException {
|
||||||
TellstickNetDevices newList = controller.callRestMethod(TelldusLiveDeviceController.HTTP_TELLDUS_DEVICES,
|
TellstickNetDevices newList = controller.callRestMethod(TelldusLiveDeviceController.HTTP_TELLDUS_DEVICES,
|
||||||
TellstickNetDevices.class);
|
TellstickNetDevices.class);
|
||||||
logger.debug("Device list {}", newList.getDevices());
|
|
||||||
if (newList.getDevices() != null) {
|
if (newList.getDevices() != null) {
|
||||||
|
logger.debug("Device list {}", newList.getDevices());
|
||||||
if (previouslist == null) {
|
if (previouslist == null) {
|
||||||
logger.debug("updateDevices, Creating devices.");
|
logger.debug("updateDevices, Creating devices.");
|
||||||
for (TellstickNetDevice device : newList.getDevices()) {
|
for (TellstickNetDevice device : newList.getDevices()) {
|
||||||
@ -172,6 +172,8 @@ public class TelldusLiveBridgeHandler extends BaseBridgeHandler implements Telld
|
|||||||
device.setUpdated(false);
|
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 {
|
throws TellstickException, InterruptedException {
|
||||||
TellstickLocalDevicesDTO newList = controller
|
TellstickLocalDevicesDTO newList = controller
|
||||||
.callRestMethod(TelldusLocalDeviceController.HTTP_LOCAL_API_DEVICES, TellstickLocalDevicesDTO.class);
|
.callRestMethod(TelldusLocalDeviceController.HTTP_LOCAL_API_DEVICES, TellstickLocalDevicesDTO.class);
|
||||||
logger.debug("Device list {}", newList.getDevices());
|
|
||||||
if (newList.getDevices() != null) {
|
if (newList.getDevices() != null) {
|
||||||
|
logger.debug("Device list {}", newList.getDevices());
|
||||||
if (previouslist == null) {
|
if (previouslist == null) {
|
||||||
for (TellstickLocalDeviceDTO device : newList.getDevices()) {
|
for (TellstickLocalDeviceDTO device : newList.getDevices()) {
|
||||||
device.setUpdated(true);
|
device.setUpdated(true);
|
||||||
@ -158,6 +158,8 @@ public class TelldusLocalBridgeHandler extends BaseBridgeHandler implements Tell
|
|||||||
device.setUpdated(false);
|
device.setUpdated(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
logger.debug("updateDevices, rest API returned null");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user