mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 00:10:20 +00:00
Fix issue with devices with no rooms or categories.
This commit is contained in:
@@ -57,8 +57,14 @@ public class VeraInfo {
|
|||||||
Device theDevice = null;
|
Device theDevice = null;
|
||||||
while (theIterator.hasNext()) {
|
while (theIterator.hasNext()) {
|
||||||
theDevice = theIterator.next();
|
theDevice = theIterator.next();
|
||||||
theDevice.setRoom(roomMap.get(theDevice.getRoom()).getName());
|
if(theDevice.getRoom() != null)
|
||||||
theDevice.setCategory(categoryMap.get(theDevice.getCategory()).getName());
|
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();
|
ListIterator<Scene> theSecneIter = theSdata.getScenes().listIterator();
|
||||||
|
|||||||
Reference in New Issue
Block a user