From 937fb5d32dc956b8775f5846d210789204702ba8 Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 27 Aug 2015 08:44:09 -0500 Subject: [PATCH] Final fix for resolving room mapping. Also applied this fix to category mappign in SDATA as well. --- src/main/java/com/bwssystems/vera/VeraInfo.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/bwssystems/vera/VeraInfo.java b/src/main/java/com/bwssystems/vera/VeraInfo.java index d87e2fe..22a3a73 100644 --- a/src/main/java/com/bwssystems/vera/VeraInfo.java +++ b/src/main/java/com/bwssystems/vera/VeraInfo.java @@ -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(""); - 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("");