diff --git a/soft/thermostat/src/settings.cpp b/soft/thermostat/src/settings.cpp index 72a59c8..c5e6ec8 100644 --- a/soft/thermostat/src/settings.cpp +++ b/soft/thermostat/src/settings.cpp @@ -124,7 +124,7 @@ void Settings::setRoomDefaultTemperature(int idx, double temperature) return; } - this->beginWriteArray("rooms"); + this->beginWriteArray("rooms", nbZones()); this->setArrayIndex(idx); this->setValue("default_temperature", temperature); this->endArray(); @@ -138,7 +138,7 @@ void Settings::setRoomPrograms(int idx, QVector &progs) return; } - this->beginWriteArray("rooms"); + this->beginWriteArray("rooms", nbZones()); this->setArrayIndex(idx); this->remove("temperature_schedule");