Explorar el Código

Switch to white if white_value in payload

Bijesh Krishnadas hace 8 años
padre
commit
145a257087
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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"]);
   }