Final fix for resolving room mapping. Also applied this fix to category

mappign in SDATA as well.
This commit is contained in:
Admin
2015-08-27 08:44:09 -05:00
parent bd60d63d0f
commit 937fb5d32d

View File

@@ -57,11 +57,11 @@ public class VeraInfo {
Device theDevice = null;
while (theIterator.hasNext()) {
theDevice = theIterator.next();
if(theDevice.getRoom() != null)
if(theDevice.getRoom() != null && roomMap.get(theDevice.getRoom()) != null)
theDevice.setRoom(roomMap.get(theDevice.getRoom()).getName());
else
theDevice.setRoom("<unknown>");
if(theDevice.getCategory() != null)
theDevice.setRoom("no room");
if(theDevice.getCategory() != null && categoryMap.get(theDevice.getCategory()) != null)
theDevice.setCategory(categoryMap.get(theDevice.getCategory()).getName());
else
theDevice.setCategory("<unknown>");