mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-19 00:20:26 +00:00
Updated bridge to be robust on put/post calls and testing. HAd to add a
body for off types.
This commit is contained in:
@@ -204,8 +204,12 @@ public class HueMulator {
|
||||
}
|
||||
|
||||
//quick template
|
||||
String body;
|
||||
url = replaceIntensityValue(url, state.getBri());
|
||||
String body = replaceIntensityValue(device.getContentBody(), state.getBri());
|
||||
if (state.isOn())
|
||||
body = replaceIntensityValue(device.getContentBody(), state.getBri());
|
||||
else
|
||||
body = replaceIntensityValue(device.getContentBodyOff(), state.getBri());
|
||||
//make call
|
||||
if(!doHttpRequest(url, device.getHttpVerb(), device.getContentType(), body)){
|
||||
response.status(HttpStatus.SC_SERVICE_UNAVAILABLE);
|
||||
|
||||
Reference in New Issue
Block a user