Kaynağa Gözat

Switch to white if white_value in payload

Bijesh Krishnadas 8 yıl önce
ebeveyn
işleme
145a257087
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      lib/MiLight/MiLightClient.cpp

+ 5 - 0
lib/MiLight/MiLightClient.cpp

@@ -298,6 +298,11 @@ void MiLightClient::update(const JsonObject& request) {
     );
     );
   }
   }
 
 
+  //Homeassistant - Switch to white if white value is set
+  if (request.containsKey("white_value")) {
+    this->updateColorWhite();
+  }
+  
   if (request.containsKey("mode")) {
   if (request.containsKey("mode")) {
     this->updateMode(request["mode"]);
     this->updateMode(request["mode"]);
   }
   }