Finished adding dim versus on, utf-8 and track state and return on api

calls.
This commit is contained in:
Admin
2016-03-18 16:38:18 -05:00
parent ad820a68c9
commit 926a7f50dc
15 changed files with 225 additions and 198 deletions

View File

@@ -1,5 +1,7 @@
package com.bwssystems.HABridge.api.hue;
import com.bwssystems.HABridge.dao.DeviceDescriptor;
/**
* Created by arm on 4/14/15.
*/
@@ -68,18 +70,18 @@ public class DeviceResponse {
this.swversion = swversion;
}
public static DeviceResponse createResponse(String name, String id){
public static DeviceResponse createResponse(DeviceDescriptor device){
DeviceState deviceState = new DeviceState();
DeviceResponse response = new DeviceResponse();
response.setState(deviceState);
deviceState.setOn(false);
deviceState.setOn(device.getDeviceState());
deviceState.setReachable(true);
deviceState.setEffect("none");
deviceState.setAlert("none");
deviceState.setBri(254);
deviceState.setBri(device.getDeviceSetValue());
response.setName(name);
response.setUniqueid(id);
response.setName(device.getName());
response.setUniqueid(device.getId());
response.setManufacturername("Philips");
response.setType("Dimmable light");
response.setModelid("LWB004");