Selaa lähdekoodia

Add night_mode to CCT command parser

Christopher Mullins 6 vuotta sitten
vanhempi
commit
592242fbd4
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      lib/MiLight/CctPacketFormatter.cpp

+ 4 - 1
lib/MiLight/CctPacketFormatter.cpp

@@ -199,7 +199,10 @@ BulbId CctPacketFormatter::parsePacket(const uint8_t* packet, JsonObject result)
     REMOTE_TYPE_CCT
   );
 
-  if (onOffGroupId < 255) {
+  // Night mode
+  if (command & 0x10) {
+    result["command"] = "night_mode";
+  } else if (onOffGroupId < 255) {
     result["state"] = cctCommandToStatus(command) == ON ? "ON" : "OFF";
   } else if (command == CCT_BRIGHTNESS_DOWN) {
     result["command"] = "brightness_down";