fix config always assumed changed

This commit is contained in:
2025-05-07 00:48:06 +02:00
parent bfc3fbc6e1
commit 171b130a29
4 changed files with 52 additions and 44 deletions

View File

@@ -183,6 +183,8 @@ export class PlantView {
getConfig(): PlantConfig {
return {
// hardcoded for now
sensor_a: true,
mode: this.mode.value,
target_moisture: this.targetMoisture.valueAsNumber,
pump_time_s: this.pumpTimeS.valueAsNumber,
@@ -191,8 +193,8 @@ export class PlantView {
pump_hour_end: +this.pumpHourEnd.value,
sensor_b: this.sensorBInstalled.checked,
max_consecutive_pump_count: this.maxConsecutivePumpCount.valueAsNumber,
moisture_sensor_min_frequency: this.moistureSensorMinFrequency.valueAsNumber || undefined,
moisture_sensor_max_frequency: this.moistureSensorMaxFrequency.valueAsNumber || undefined,
moisture_sensor_min_frequency: this.moistureSensorMinFrequency.valueAsNumber || null,
moisture_sensor_max_frequency: this.moistureSensorMaxFrequency.valueAsNumber || null
};
}
}