mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-22 09:22:23 +00:00
Update a few fixes
Fixed items for FHEM and Domoticz
This commit is contained in:
@@ -198,7 +198,7 @@ public class BridgeSettings extends BackupHandler {
|
||||
theBridgeSettings.setUpnpGroupDb(Configuration.GROUP_DB_DIRECTORY);
|
||||
|
||||
if(theBridgeSettings.getNumberoflogmessages() == null || theBridgeSettings.getNumberoflogmessages() <= 0)
|
||||
theBridgeSettings.setNumberoflogmessages(new Integer(Configuration.NUMBER_OF_LOG_MESSAGES));
|
||||
theBridgeSettings.setNumberoflogmessages(Integer.valueOf(Configuration.NUMBER_OF_LOG_MESSAGES));
|
||||
|
||||
if(theBridgeSettings.getButtonsleep() == null || theBridgeSettings.getButtonsleep() < 0)
|
||||
theBridgeSettings.setButtonsleep(Integer.parseInt(Configuration.DEFAULT_BUTTON_SLEEP));
|
||||
|
||||
@@ -1073,9 +1073,9 @@ public class HueMulator {
|
||||
}
|
||||
|
||||
if (body.contains("\"bri_inc\""))
|
||||
targetBriInc = new Integer(theStateChanges.getBri_inc());
|
||||
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
|
||||
else if (body.contains("\"bri\"")) {
|
||||
targetBri = new Integer(theStateChanges.getBri());
|
||||
targetBri =Integer.valueOf(theStateChanges.getBri());
|
||||
}
|
||||
|
||||
state = device.getDeviceState();
|
||||
@@ -1153,11 +1153,11 @@ public class HueMulator {
|
||||
}
|
||||
|
||||
if (body.contains("\"bri_inc\"")) {
|
||||
targetBriInc = new Integer(theStateChanges.getBri_inc());
|
||||
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
|
||||
isDimRequest = true;
|
||||
}
|
||||
else if (body.contains("\"bri\"")) {
|
||||
targetBri = new Integer(theStateChanges.getBri());
|
||||
targetBri = Integer.valueOf(theStateChanges.getBri());
|
||||
isDimRequest = true;
|
||||
}
|
||||
|
||||
@@ -1343,10 +1343,10 @@ public class HueMulator {
|
||||
|
||||
if (group != null) {
|
||||
if (body.contains("\"bri_inc\"")) {
|
||||
targetBriInc = new Integer(theStateChanges.getBri_inc());
|
||||
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
|
||||
}
|
||||
else if (body.contains("\"bri\"")) {
|
||||
targetBri = new Integer(theStateChanges.getBri());
|
||||
targetBri = Integer.valueOf(theStateChanges.getBri());
|
||||
}
|
||||
|
||||
state = group.getAction();
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.bwssystems.HABridge.plugins.http.HTTPHandler;
|
||||
import com.bwssystems.HABridge.plugins.http.HTTPHome;
|
||||
import com.bwssystems.HABridge.plugins.http.HttpTestHandler;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
|
||||
public class FHEMHome implements Home {
|
||||
private static final Logger log = LoggerFactory.getLogger(FHEMHome.class);
|
||||
@@ -47,7 +48,8 @@ public class FHEMHome implements Home {
|
||||
public String deviceHandler(CallItem anItem, MultiCommandUtil aMultiUtil, String lightId, int intensity,
|
||||
Integer targetBri, Integer targetBriInc, ColorData colorData, DeviceDescriptor device, String body) {
|
||||
|
||||
String theUrl = anItem.getItem().getAsString();
|
||||
JsonElement jsonUrl = anItem.getItem();
|
||||
String theUrl = jsonUrl.toString();
|
||||
String responseString = null;
|
||||
|
||||
if(theUrl != null && !theUrl.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user