Merge pull request #54 from cjkas/fix/restore-skip-rooms

fix: skip the room records too when a restore leaves the shades out
This commit is contained in:
cjkas 2026-10-17 23:11:42 +02:00 • committed by GitHub
commit 2b2a4f815d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 91 additions and 20 deletions

View file

@ -574,10 +574,8 @@ bool ShadeConfigFile::restoreFile(SomfyShadeController *s, const char *filename,
}
else {
ESP_LOGI(TAG, "Shade data ignored");
// FF past the shades and groups.
this->file.seek(this->file.position()
+ (this->header.shadeRecords * this->header.shadeRecordSize)
+ (this->header.groupRecords * this->header.groupRecordSize), SeekSet); // Start at the beginning of the file after the header.
// FF past the rooms, shades and groups.
this->file.seek(this->file.position() + shadeModelBytes(this->header), SeekSet);
}
if(opts.repeaters) {
ESP_LOGI(TAG, "Restoring Repeaters...");