Added safty check so that Google sync does not fail
This commit is contained in:
parent
0b029f68e3
commit
c9227fd8ac
1 changed files with 5 additions and 0 deletions
|
|
@ -115,6 +115,11 @@ public class SmartHomeImpl extends SmartHomeApp implements OAuth2TokenRegistrati
|
|||
DeviceType type = DeviceType.getType(device);
|
||||
DeviceTrait[] traits = DeviceTraitFactory.getTraits(device);
|
||||
|
||||
if (type == null) {
|
||||
logger.warning("DeviceType returned null for Hal device(" + device.getDeviceConfig() + "): " + device);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Generate payload
|
||||
|
||||
SyncResponse.Payload.Device.Builder deviceBuilder =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue