diff --git a/xaal.go b/xaal.go index 6828b6a07340f1311b6e96921d7f1524b4ca92d8..0a8498fbc757d79ffff2286a80316f9ea0c7904a 100644 --- a/xaal.go +++ b/xaal.go @@ -303,6 +303,8 @@ func (dev *Lamp) update(payload map[string]interface{}) { // color_temp if dev.getMode() == "white" { // color_temp change when we are in color mode (looks like a z2m bug) + // so we have to only update when we are in white mode. Without this check + // the color_temp is wrong when you change the mode w/ setMode color_temp, exists := payload["color_temp"].(float64) if exists { // Mired = 1,000,000 / Temperature in Kelvin