mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 00:10:20 +00:00
"Extended color light" isn't used anymore for all devices without thinking about it. It will now automatically differentiate between Color and Dimmable light by the following logic: 1. If it's Philips Hue passthru look at the state: if it contains the attribute "colormode" it's a Extended color light, otherwise it's a Dimmable light. 2. If it's no passthru it's a dimmable light if the colorUrl has no content. I didn't use On/Off light because i disovered that a) the hue app treats these exactly the same as dimmable light, you can still "change the brightness" and b) the amazon echo doesn't find these lights without the skill I also enhanced the filter options in the web ui. You have a textbox "Show devices visible to". You can fill in an ip-address and there will only be devices displayed that a) have the ip address in the requesterFilter or b) don't filter by requester. If you tick the checkbox "Must contain filter" option b isn't used. This means also if you check the box with no ip address in the textbox only devices without request filter will be shown. Also there is a filter by device type. All these 3 filter options will be remembered as long as the browser tab is closed.
148 lines
3.0 KiB
Java
148 lines
3.0 KiB
Java
package com.bwssystems.HABridge.dao;
|
|
|
|
import com.bwssystems.HABridge.api.hue.DeviceState;
|
|
import com.google.gson.annotations.Expose;
|
|
import com.google.gson.annotations.SerializedName;
|
|
import com.bwssystems.HABridge.api.hue.GroupState;
|
|
import com.bwssystems.HABridge.dao.DeviceDescriptor;
|
|
|
|
/*
|
|
* Object to handle the device configuration
|
|
*/
|
|
public class GroupDescriptor{
|
|
@SerializedName("id")
|
|
@Expose
|
|
private String id;
|
|
@SerializedName("name")
|
|
@Expose
|
|
private String name;
|
|
@SerializedName("groupType")
|
|
@Expose
|
|
private String groupType;
|
|
@SerializedName("groupClass")
|
|
@Expose
|
|
private String groupClass;
|
|
@SerializedName("requesterAddress")
|
|
@Expose
|
|
private String requesterAddress;
|
|
@SerializedName("inactive")
|
|
@Expose
|
|
private boolean inactive;
|
|
@SerializedName("description")
|
|
@Expose
|
|
private String description;
|
|
@SerializedName("comments")
|
|
@Expose
|
|
private String comments;
|
|
|
|
private DeviceState action;
|
|
private GroupState groupState;
|
|
|
|
@SerializedName("lights")
|
|
@Expose
|
|
private String[] lights;
|
|
@SerializedName("exposeAsLight")
|
|
@Expose
|
|
private String exposeAsLight;
|
|
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getGroupType() {
|
|
return groupType;
|
|
}
|
|
|
|
public void setGroupType(String groupType) {
|
|
this.groupType = groupType;
|
|
}
|
|
|
|
public String getGroupClass() {
|
|
return groupClass;
|
|
}
|
|
|
|
public void setGroupClass(String groupClass) {
|
|
this.groupClass = groupClass;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public GroupState getGroupState() {
|
|
if(groupState == null)
|
|
groupState = new GroupState(false,false);
|
|
return groupState;
|
|
}
|
|
|
|
public void setGroupState(GroupState groupState) {
|
|
this.groupState = groupState;
|
|
}
|
|
|
|
public DeviceState getAction() {
|
|
if(action == null)
|
|
action = DeviceState.createDeviceState(true);
|
|
return action;
|
|
}
|
|
|
|
public void setAction(DeviceState action) {
|
|
this.action = action;
|
|
}
|
|
|
|
public boolean isInactive() {
|
|
return inactive;
|
|
}
|
|
|
|
public void setInactive(boolean inactive) {
|
|
this.inactive = inactive;
|
|
}
|
|
|
|
public String getRequesterAddress() {
|
|
return requesterAddress;
|
|
}
|
|
|
|
public void setRequesterAddress(String requesterAddress) {
|
|
this.requesterAddress = requesterAddress;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public String getComments() {
|
|
return comments;
|
|
}
|
|
|
|
public void setComments(String comments) {
|
|
this.comments = comments;
|
|
}
|
|
|
|
public String[] getLights() {
|
|
return lights;
|
|
}
|
|
|
|
public void setLights(String[] lights) {
|
|
this.lights = lights;
|
|
}
|
|
|
|
public void setExposeAsLight(String exposeFor) {
|
|
this.exposeAsLight = exposeFor;
|
|
}
|
|
|
|
public String getExposeAsLight() {
|
|
return exposeAsLight;
|
|
}
|
|
} |