Some more bug fixes
This commit is contained in:
parent
fa80fbc114
commit
870d9cbbab
2 changed files with 4 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ public class SmartHomeImpl extends SmartHomeApp implements TokenRegistrationList
|
|||
SyncResponse.Payload.Device.Builder deviceBuilder =
|
||||
new SyncResponse.Payload.Device.Builder()
|
||||
.setId(device.getClass().getSimpleName() + "-" + device.getId())
|
||||
.setType(type.toString())
|
||||
.setType("" + type)
|
||||
.setTraits(DeviceTraitFactory.getTraitIds(traits))
|
||||
.setName(
|
||||
DeviceProto.DeviceNames.newBuilder()
|
||||
|
|
|
|||
|
|
@ -148,6 +148,9 @@ public enum DeviceType {
|
|||
|
||||
|
||||
public static DeviceType getType(HalAbstractDevice device) {
|
||||
if (device == null || device.getDeviceData() == null)
|
||||
return null;
|
||||
|
||||
switch (device.getDeviceData().getClass().getName()) {
|
||||
case "se.hal.struct.devicedata.DimmerEventData":
|
||||
case "se.hal.struct.devicedata.OnOffEventData":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue