瀏覽代碼

Switch to white if white_value in payload

Bijesh Krishnadas 8 年之前
父節點
當前提交
145a257087
共有 1 個文件被更改,包括 5 次插入0 次删除
  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")) {
     this->updateMode(request["mode"]);
   }