|
@ -8,10 +8,13 @@ import ( |
|
|
type Device struct { |
|
|
type Device struct { |
|
|
ID int `json:"id"` |
|
|
ID int `json:"id"` |
|
|
BridgeID int `json:"bridgeID"` |
|
|
BridgeID int `json:"bridgeID"` |
|
|
|
|
|
InternalID string `json:"internalId"` |
|
|
Icon string `json:"icon"` |
|
|
Icon string `json:"icon"` |
|
|
Name string `json:"name"` |
|
|
Name string `json:"name"` |
|
|
Capabilities []DeviceCapability `json:"capabilities"` |
|
|
Capabilities []DeviceCapability `json:"capabilities"` |
|
|
Properties map[string]string `json:"properties"` |
|
|
|
|
|
|
|
|
ButtonNames []string `json:"buttonNames"` |
|
|
|
|
|
DriverProperties map[string]string `json:"driverProperties"` |
|
|
|
|
|
UserProperties map[string]string `json:"userProperties"` |
|
|
State DeviceState `json:"state"` |
|
|
State DeviceState `json:"state"` |
|
|
Tags []string `json:"tags"` |
|
|
Tags []string `json:"tags"` |
|
|
} |
|
|
} |
|
@ -48,12 +51,7 @@ var ( |
|
|
DCPower DeviceCapability = "Power" |
|
|
DCPower DeviceCapability = "Power" |
|
|
DCColorHS DeviceCapability = "ColorHS" |
|
|
DCColorHS DeviceCapability = "ColorHS" |
|
|
DCColorKelvin DeviceCapability = "ColorKelvin" |
|
|
DCColorKelvin DeviceCapability = "ColorKelvin" |
|
|
DCButtonDefault DeviceCapability = "ButtonDefault" |
|
|
|
|
|
DCButtonOn DeviceCapability = "ButtonOn" |
|
|
|
|
|
DCButtonOff DeviceCapability = "ButtonOff" |
|
|
|
|
|
DCButtonPlus DeviceCapability = "ButtonPlus" |
|
|
|
|
|
DCButtonMinus DeviceCapability = "ButtonMinus" |
|
|
|
|
|
DCButtonToggle DeviceCapability = "ButtonToggle" |
|
|
|
|
|
|
|
|
DCButtons DeviceCapability = "Buttons" |
|
|
DCIntensity DeviceCapability = "Intensity" |
|
|
DCIntensity DeviceCapability = "Intensity" |
|
|
DCTemperature DeviceCapability = "Temperature" |
|
|
DCTemperature DeviceCapability = "Temperature" |
|
|
) |
|
|
) |
|
@ -62,12 +60,7 @@ var Capabilities = []DeviceCapability{ |
|
|
DCPower, |
|
|
DCPower, |
|
|
DCColorHS, |
|
|
DCColorHS, |
|
|
DCColorKelvin, |
|
|
DCColorKelvin, |
|
|
DCButtonDefault, |
|
|
|
|
|
DCButtonOn, |
|
|
|
|
|
DCButtonOff, |
|
|
|
|
|
DCButtonPlus, |
|
|
|
|
|
DCButtonMinus, |
|
|
|
|
|
DCButtonToggle, |
|
|
|
|
|
|
|
|
DCButtons, |
|
|
DCIntensity, |
|
|
DCIntensity, |
|
|
DCTemperature, |
|
|
DCTemperature, |
|
|
} |
|
|
} |
|
|