diff --git a/Somfy.cpp b/Somfy.cpp index 685b2c1..594b6f6 100644 --- a/Somfy.cpp +++ b/Somfy.cpp @@ -122,7 +122,7 @@ void somfy_frame_t::decodeFrame(byte* frame) { this->cmd = (somfy_commands)((decoded[1] >> 4) | ((decoded[8] & 0x08) << 4)); this->rollingCode = decoded[3] + (decoded[2] << 8); this->remoteAddress = (decoded[6] + (decoded[5] << 8) + (decoded[4] << 16)); - this->valid = this->checksum == checksum && this->remoteAddress < 16777215 && this->rollingCode > 0; + this->valid = this->checksum == checksum && this->remoteAddress > 0 && this->remoteAddress < 16777215 && this->rollingCode > 0; if (this->valid) { // Check for valid command. switch (this->cmd) { diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index 9cac5ca..b9e6853 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ