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();