fix oops in bridgetest.

This commit is contained in:
2021-05-29 16:58:44 +02:00
parent 2aa2757828
commit 74fb2c6b5a
+7 -6
View File
@@ -126,12 +126,13 @@ func main() {
for _, id := range ids {
if id == -1 || id == device.ID {
if (color.IsKelvin() && device.HasCapability(models.DCColorKelvin)) || (color.IsHueSat() && device.HasCapability(models.DCColorHS)) {
if device.HasCapability(models.DCPower) {
device.State.Power = power
}
if device.HasCapability(models.DCIntensity) {
device.State.Intensity = intensity
}
device.State.Color = color
}
if device.HasCapability(models.DCPower) {
device.State.Power = power
}
if device.HasCapability(models.DCIntensity) {
device.State.Intensity = intensity
}
updatedDevices = append(updatedDevices, device)