Fixed issues with 4beta1

This commit is contained in:
Admin
2016-12-30 15:00:31 -06:00
parent 363fb605a6
commit 9c4eb58739
20 changed files with 182 additions and 124 deletions

View File

@@ -37,9 +37,8 @@ public class HassHome implements Home {
hassMap = null;
aGsonHandler = null;
validHass = bridgeSettings.isValidHass();
if(!validHass){
log.debug("not a valid hass");
} else {
log.info("HomeAssistant Home created." + (validHass ? "" : " No HomeAssistants configured."));
if(validHass) {
hassMap = new HashMap<String,HomeAssistant>();
aGsonHandler =
new GsonBuilder()
@@ -95,6 +94,8 @@ public class HassHome implements Home {
}
private Boolean addHassDevices(List<HassDevice> theDeviceList, List<State> theSourceList, String theKey) {
if(!validHass)
return null;
Iterator<State> devices = theSourceList.iterator();
while(devices.hasNext()) {
State theDevice = devices.next();
@@ -155,6 +156,8 @@ public class HassHome implements Home {
@Override
public void closeHome() {
if(!validHass)
return;
Iterator<String> keys = hassMap.keySet().iterator();
while(keys.hasNext()) {
String key = keys.next();