From bd60d63d0f7004154de56f05adf46112618e98df Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 26 Aug 2015 16:52:44 -0500 Subject: [PATCH] Fix issue with devices with no rooms or categories. --- src/main/java/com/bwssystems/vera/VeraInfo.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bwssystems/vera/VeraInfo.java b/src/main/java/com/bwssystems/vera/VeraInfo.java index a2e1051..d87e2fe 100644 --- a/src/main/java/com/bwssystems/vera/VeraInfo.java +++ b/src/main/java/com/bwssystems/vera/VeraInfo.java @@ -57,8 +57,14 @@ public class VeraInfo { Device theDevice = null; while (theIterator.hasNext()) { theDevice = theIterator.next(); - theDevice.setRoom(roomMap.get(theDevice.getRoom()).getName()); - theDevice.setCategory(categoryMap.get(theDevice.getCategory()).getName()); + if(theDevice.getRoom() != null) + theDevice.setRoom(roomMap.get(theDevice.getRoom()).getName()); + else + theDevice.setRoom(""); + if(theDevice.getCategory() != null) + theDevice.setCategory(categoryMap.get(theDevice.getCategory()).getName()); + else + theDevice.setCategory(""); } ListIterator theSecneIter = theSdata.getScenes().listIterator();