Skip to content

Commit f97c718

Browse files
committed
Update a few fixes
Fixed items for FHEM and Domoticz
1 parent d05b6be commit f97c718

File tree

6 files changed

+207
-205
lines changed

6 files changed

+207
-205
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.bwssystems.HABridge</groupId>
77
<artifactId>ha-bridge</artifactId>
8-
<version>5.2.2RC4</version>
8+
<version>5.2.2</version>
99
<packaging>jar</packaging>
1010

1111
<name>HA Bridge</name>

src/main/java/com/bwssystems/HABridge/BridgeSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public void buildSettings() {
198198
theBridgeSettings.setUpnpGroupDb(Configuration.GROUP_DB_DIRECTORY);
199199

200200
if(theBridgeSettings.getNumberoflogmessages() == null || theBridgeSettings.getNumberoflogmessages() <= 0)
201-
theBridgeSettings.setNumberoflogmessages(new Integer(Configuration.NUMBER_OF_LOG_MESSAGES));
201+
theBridgeSettings.setNumberoflogmessages(Integer.valueOf(Configuration.NUMBER_OF_LOG_MESSAGES));
202202

203203
if(theBridgeSettings.getButtonsleep() == null || theBridgeSettings.getButtonsleep() < 0)
204204
theBridgeSettings.setButtonsleep(Integer.parseInt(Configuration.DEFAULT_BUTTON_SLEEP));

src/main/java/com/bwssystems/HABridge/hue/HueMulator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,9 @@ private String updateState(String userId, String lightId, String body, String ip
10731073
}
10741074

10751075
if (body.contains("\"bri_inc\""))
1076-
targetBriInc = new Integer(theStateChanges.getBri_inc());
1076+
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
10771077
else if (body.contains("\"bri\"")) {
1078-
targetBri = new Integer(theStateChanges.getBri());
1078+
targetBri =Integer.valueOf(theStateChanges.getBri());
10791079
}
10801080

10811081
state = device.getDeviceState();
@@ -1153,11 +1153,11 @@ private String changeState(String userId, String lightId, String body, String ip
11531153
}
11541154

11551155
if (body.contains("\"bri_inc\"")) {
1156-
targetBriInc = new Integer(theStateChanges.getBri_inc());
1156+
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
11571157
isDimRequest = true;
11581158
}
11591159
else if (body.contains("\"bri\"")) {
1160-
targetBri = new Integer(theStateChanges.getBri());
1160+
targetBri = Integer.valueOf(theStateChanges.getBri());
11611161
isDimRequest = true;
11621162
}
11631163

@@ -1343,10 +1343,10 @@ private String changeGroupState(String userId, String groupId, String body, Stri
13431343

13441344
if (group != null) {
13451345
if (body.contains("\"bri_inc\"")) {
1346-
targetBriInc = new Integer(theStateChanges.getBri_inc());
1346+
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
13471347
}
13481348
else if (body.contains("\"bri\"")) {
1349-
targetBri = new Integer(theStateChanges.getBri());
1349+
targetBri = Integer.valueOf(theStateChanges.getBri());
13501350
}
13511351

13521352
state = group.getAction();

src/main/java/com/bwssystems/HABridge/plugins/fhem/FHEMHome.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.bwssystems.HABridge.plugins.http.HTTPHome;
2828
import com.bwssystems.HABridge.plugins.http.HttpTestHandler;
2929
import com.google.gson.Gson;
30+
import com.google.gson.JsonElement;
3031

3132
public class FHEMHome implements Home {
3233
private static final Logger log = LoggerFactory.getLogger(FHEMHome.class);
@@ -47,7 +48,8 @@ public FHEMHome(BridgeSettings bridgeSettings) {
4748
public String deviceHandler(CallItem anItem, MultiCommandUtil aMultiUtil, String lightId, int intensity,
4849
Integer targetBri, Integer targetBriInc, ColorData colorData, DeviceDescriptor device, String body) {
4950

50-
String theUrl = anItem.getItem().getAsString();
51+
JsonElement jsonUrl = anItem.getItem();
52+
String theUrl = jsonUrl.toString();
5153
String responseString = null;
5254

5355
if(theUrl != null && !theUrl.isEmpty()) {

0 commit comments

Comments
 (0)