This commit is contained in:
@@ -157,6 +157,7 @@ func applyCmdToHandler(model models.EventHandler, cmd Command) models.EventHandl
|
||||
model.Actions.SetPower = nds.Power
|
||||
model.Actions.SetColor = nds.Color
|
||||
model.Actions.SetIntensity = nds.Intensity
|
||||
model.Actions.SetTemperature = nds.Temperature
|
||||
|
||||
// Add intensity
|
||||
model.Actions.AddIntensity = cmd.Params.Get("add-intensity").Float()
|
||||
|
||||
@@ -198,6 +198,10 @@ func (d *Device) SetState(newState NewDeviceState) error {
|
||||
d.State.Intensity = *newState.Intensity
|
||||
}
|
||||
|
||||
if newState.Temperature != nil && d.HasCapability(DCTemperatureControl) {
|
||||
d.State.Temperature = *newState.Temperature
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user