From cc4f49d45a50f3b5e7fa119b7ea993ff47642c29 Mon Sep 17 00:00:00 2001 From: jkerdreux-imt <jerome.kerdreux@imt-atlantique.fr> Date: Tue, 12 Nov 2024 00:09:58 +0100 Subject: [PATCH] Comments --- xaal.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xaal.go b/xaal.go index 6828b6a..0a8498f 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 -- GitLab