v0.14.4
This commit is contained in:
+3
-1
@@ -298,6 +298,7 @@ $('#copyZoneSettings')?.addEventListener('click', () => {
|
||||
device_id: f.elements.device_id.value,
|
||||
sensor_source: f.elements.sensor_source.value,
|
||||
ha_entity_id: f.elements.ha_entity_id.value,
|
||||
ha_outdoor_entity_id: f.elements.ha_outdoor_entity_id.value,
|
||||
enabled: f.elements.enabled.checked,
|
||||
};
|
||||
const copyFields = ['setpoint', 'cool_comfort_setpoint', 'cool_sleep_setpoint', 'cool_away_setpoint', 'heat_comfort_setpoint', 'heat_sleep_setpoint', 'heat_away_setpoint', 'hysteresis', 'cool_hysteresis', 'heat_hysteresis', 'min_on_seconds', 'min_off_seconds', 'min_adjust_seconds', 'standby_offset_c', 'external_sensor_weight_percent', 'max_sensor_difference', 'sensor_stale_after_seconds'];
|
||||
@@ -317,6 +318,7 @@ $('#copyZoneSettings')?.addEventListener('click', () => {
|
||||
f.elements.device_id.value = protectedValues.device_id;
|
||||
f.elements.sensor_source.value = protectedValues.sensor_source;
|
||||
f.elements.ha_entity_id.value = protectedValues.ha_entity_id;
|
||||
f.elements.ha_outdoor_entity_id.value = protectedValues.ha_outdoor_entity_id;
|
||||
f.elements.enabled.checked = protectedValues.enabled;
|
||||
f.dataset.editingZoneId = targetId;
|
||||
updateZoneSensorFields();
|
||||
@@ -525,7 +527,7 @@ $('#zoneForm').addEventListener('submit', async event => {
|
||||
heat_comfort_setpoint: parseDecimal(raw.heat_comfort_setpoint), heat_sleep_setpoint: parseDecimal(raw.heat_sleep_setpoint), heat_away_setpoint: parseDecimal(raw.heat_away_setpoint),
|
||||
hysteresis: parseDecimal(raw.hysteresis), separate_hysteresis: form.separate_hysteresis.checked, cool_hysteresis: parseDecimal(raw.cool_hysteresis), heat_hysteresis: parseDecimal(raw.heat_hysteresis), min_on_seconds: Number(raw.min_on_seconds), min_off_seconds: Number(raw.min_off_seconds),
|
||||
min_adjust_seconds: Number(raw.min_adjust_seconds), standby_offset_c: parseDecimal(raw.standby_offset_c), smart_fan: form.smart_fan.checked,
|
||||
sensor_source: raw.sensor_source, ha_entity_id: raw.ha_entity_id || null, external_sensor_weight: Number(raw.external_sensor_weight_percent) / 100, max_sensor_difference: parseDecimal(raw.max_sensor_difference), sensor_stale_after_seconds: Number(raw.sensor_stale_after_seconds || 300), revision: raw.revision ? Number(raw.revision) : null
|
||||
sensor_source: raw.sensor_source, ha_entity_id: raw.ha_entity_id || null, ha_outdoor_entity_id: raw.ha_outdoor_entity_id || null, external_sensor_weight: Number(raw.external_sensor_weight_percent) / 100, max_sensor_difference: parseDecimal(raw.max_sensor_difference), sensor_stale_after_seconds: Number(raw.sensor_stale_after_seconds || 300), revision: raw.revision ? Number(raw.revision) : null
|
||||
};
|
||||
await runFormTask(form, async () => {
|
||||
await api(id ? `/api/zones/${encodeURIComponent(id)}` : '/api/zones', { method: id ? 'PUT' : 'POST', body }); form.closest('dialog').close(); form.reset(); await loadBootstrap(); toast(tr('common.saved'));
|
||||
|
||||
Reference in New Issue
Block a user