diff --git a/Somfy.cpp b/Somfy.cpp index 927fa12..5603015 100644 --- a/Somfy.cpp +++ b/Somfy.cpp @@ -1563,6 +1563,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) { case somfy_commands::Flag: this->lastFrame.processed = true; if(this->shadeType == shade_types::drycontact) return; + if(this->lastFrame.rollingCode & 0x8000) return; // Some sensors send bogus frames with a rollingCode >= 32768 that cause them to change the state. this->flags &= ~(static_cast(somfy_flags_t::SunFlag)); somfy.isDirty = true; this->emitState(); @@ -1571,6 +1572,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) { break; case somfy_commands::SunFlag: if(this->shadeType == shade_types::drycontact) return; + if(this->lastFrame.rollingCode & 0x8000) return; // Some sensors send bogus frames with a rollingCode >= 32768 that cause them to change the state. { const bool isWindy = this->flags & static_cast(somfy_flags_t::Windy); this->flags |= static_cast(somfy_flags_t::SunFlag); diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index bbd7fe8..ed70f1c 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ