mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
Merge pull request #1249 from marcopollacci/dev_branch_5.3.x
Dev branch 5.3.x merge changes
This commit is contained in:
@@ -17,6 +17,7 @@ public class DeviceResponse {
|
|||||||
private String swversion;
|
private String swversion;
|
||||||
private String swconfigid;
|
private String swconfigid;
|
||||||
private String productid;
|
private String productid;
|
||||||
|
private String productname;
|
||||||
|
|
||||||
public DeviceState getState() {
|
public DeviceState getState() {
|
||||||
return state;
|
return state;
|
||||||
@@ -90,6 +91,14 @@ public class DeviceResponse {
|
|||||||
this.productid = productid;
|
this.productid = productid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productname) {
|
||||||
|
this.productname = productname;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getLuminaireuniqueid() {
|
public String getLuminaireuniqueid() {
|
||||||
return luminaireuniqueid;
|
return luminaireuniqueid;
|
||||||
@@ -109,10 +118,11 @@ public class DeviceResponse {
|
|||||||
|
|
||||||
if (device.isColorDevice()) {
|
if (device.isColorDevice()) {
|
||||||
response.setType("Extended color light");
|
response.setType("Extended color light");
|
||||||
response.setModelid("LCT010");
|
response.setModelid("LCT015");
|
||||||
response.setSwversion("1.15.2_r19181");
|
response.setSwversion("1.46.13_r26312");
|
||||||
response.setSwconfigid("F921C859");
|
response.setSwconfigid("52E3234B");
|
||||||
response.setProductid("Philips-LCT010-1-A19ECLv4");
|
response.setProductid("Philips-LCT015-1-A19ECLv5");
|
||||||
|
response.setProductName("Hue color lamp");
|
||||||
} else {
|
} else {
|
||||||
response.setType("Dimmable light");
|
response.setType("Dimmable light");
|
||||||
response.setModelid("LWB007");
|
response.setModelid("LWB007");
|
||||||
@@ -129,13 +139,14 @@ public class DeviceResponse {
|
|||||||
response.setState(group.getAction());
|
response.setState(group.getAction());
|
||||||
|
|
||||||
response.setName(group.getName());
|
response.setName(group.getName());
|
||||||
response.setUniqueid("00:17:88:5E:D3:FF-" + String.format("%02X", Integer.parseInt(group.getId())));
|
response.setUniqueid("00:11:22:33:44:55:66:77-" + String.format("%02X", Integer.parseInt(group.getId())));
|
||||||
response.setManufacturername("Philips");
|
response.setManufacturername("Philips");
|
||||||
response.setType("Extended color light");
|
response.setType("Extended color light");
|
||||||
response.setModelid("LCT010");
|
response.setModelid("LCT015");
|
||||||
response.setSwversion("1.15.2_r19181");
|
response.setSwversion("1.46.13_r26312");
|
||||||
response.setSwconfigid("F921C859");
|
response.setSwconfigid("52E3234B");
|
||||||
response.setProductid("Philips-LCT010-1-A19ECLv4");
|
response.setProductid("Philips-LCT015-1-A19ECLv5");
|
||||||
|
response.setProductName("Hue color lamp");
|
||||||
|
|
||||||
response.setLuminaireuniqueid(null);
|
response.setLuminaireuniqueid(null);
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ public class DeviceRepository extends BackupHandler {
|
|||||||
nextId++;
|
nextId++;
|
||||||
}
|
}
|
||||||
if (descriptors[i].getUniqueid() == null || descriptors[i].getUniqueid().length() == 0) {
|
if (descriptors[i].getUniqueid() == null || descriptors[i].getUniqueid().length() == 0) {
|
||||||
descriptors[i].setUniqueid("00:17:88:5E:D3:" + hueUniqueId(Integer.valueOf(descriptors[i].getId())));
|
descriptors[i].setUniqueid("00:11:22:33:44:55:66:" + hueUniqueId(Integer.valueOf(descriptors[i].getId())));
|
||||||
}
|
}
|
||||||
put(descriptors[i].getId(), descriptors[i]);
|
put(descriptors[i].getId(), descriptors[i]);
|
||||||
theNames = theNames + " " + descriptors[i].getName() + ", ";
|
theNames = theNames + " " + descriptors[i].getName() + ", ";
|
||||||
@@ -228,7 +228,7 @@ public class DeviceRepository extends BackupHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
theDevice.setId(String.valueOf(nextId));
|
theDevice.setId(String.valueOf(nextId));
|
||||||
theDevice.setUniqueid("00:17:88:5E:D3:" + hueUniqueId(nextId));
|
theDevice.setUniqueid("00:11:22:33:44:55:66:" + hueUniqueId(nextId));
|
||||||
nextId++;
|
nextId++;
|
||||||
}
|
}
|
||||||
newdevices.put(theDevice.getId(), theDevice);
|
newdevices.put(theDevice.getId(), theDevice);
|
||||||
@@ -320,4 +320,4 @@ public class DeviceRepository extends BackupHandler {
|
|||||||
|
|
||||||
return theUniqueId;
|
return theUniqueId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user