fix oops in bridgetest.
This commit is contained in:
@@ -126,12 +126,13 @@ func main() {
|
|||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
if id == -1 || id == device.ID {
|
if id == -1 || id == device.ID {
|
||||||
if (color.IsKelvin() && device.HasCapability(models.DCColorKelvin)) || (color.IsHueSat() && device.HasCapability(models.DCColorHS)) {
|
if (color.IsKelvin() && device.HasCapability(models.DCColorKelvin)) || (color.IsHueSat() && device.HasCapability(models.DCColorHS)) {
|
||||||
if device.HasCapability(models.DCPower) {
|
device.State.Color = color
|
||||||
device.State.Power = power
|
}
|
||||||
}
|
if device.HasCapability(models.DCPower) {
|
||||||
if device.HasCapability(models.DCIntensity) {
|
device.State.Power = power
|
||||||
device.State.Intensity = intensity
|
}
|
||||||
}
|
if device.HasCapability(models.DCIntensity) {
|
||||||
|
device.State.Intensity = intensity
|
||||||
}
|
}
|
||||||
|
|
||||||
updatedDevices = append(updatedDevices, device)
|
updatedDevices = append(updatedDevices, device)
|
||||||
|
|||||||
Reference in New Issue
Block a user