Skip to content

Commit

Permalink
Fix issue with devices with no rooms or categories.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwssytems committed Aug 26, 2015
1 parent 439b081 commit bd60d63
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/com/bwssystems/vera/VeraInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ private void denormalizeSdata(Sdata theSdata) {
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("<unknown>");
if(theDevice.getCategory() != null)
theDevice.setCategory(categoryMap.get(theDevice.getCategory()).getName());
else
theDevice.setCategory("<unknown>");
}

ListIterator<Scene> theSecneIter = theSdata.getScenes().listIterator();
Expand Down

0 comments on commit bd60d63

Please sign in to comment.