v0.8.17
This commit is contained in:
+7
-3
@@ -133,11 +133,15 @@ function validateForm(form) {
|
||||
showFieldError(entity, entity?.value?.trim() ? tr('validation.entityId') : tr('validation.required'));
|
||||
valid = false;
|
||||
}
|
||||
[
|
||||
const zoneDecimalFields = [
|
||||
['cool_comfort_setpoint',8,30],['cool_sleep_setpoint',8,30],['cool_away_setpoint',8,30],
|
||||
['heat_comfort_setpoint',8,30],['heat_sleep_setpoint',8,30],['heat_away_setpoint',8,30],
|
||||
['hysteresis',0.1,5],['max_sensor_difference',0.1,20],['standby_offset_c',0.5,8]
|
||||
].forEach(([name,min,max]) => { if (!validateDecimalField(form,name,min,max)) valid = false; });
|
||||
['max_sensor_difference',0.1,20],['standby_offset_c',0.5,8],
|
||||
...(form.elements.separate_hysteresis?.checked
|
||||
? [['cool_hysteresis',0.1,5],['heat_hysteresis',0.1,5]]
|
||||
: [['hysteresis',0.1,5]])
|
||||
];
|
||||
zoneDecimalFields.forEach(([name,min,max]) => { if (!validateDecimalField(form,name,min,max)) valid = false; });
|
||||
}
|
||||
|
||||
if (!valid) {
|
||||
|
||||
Reference in New Issue
Block a user