change default values for solar+bat mode

This commit is contained in:
2026-07-23 06:05:16 +02:00
parent 0f20ec0758
commit 821b177e81
+2 -2
View File
@@ -36,7 +36,7 @@ const CHARGING_MODES = [
{ value: 'solar_battery' as const, label: 'Solar+Batt' },
]
const modeForm = ref<ChargingParams>({
mode: 'off', max_amp: 16, min_battery_soc: 20, hysteresis: 5,
mode: 'off', max_amp: 16, min_battery_soc: 80, hysteresis: 15,
target_kwh: 0, target_soc: 0, phases: 3,
})
const stopMode = ref<'none' | 'kwh' | 'soc'>('none')
@@ -174,7 +174,7 @@ async function refreshCharger() {
chargerSt.value = st
chargerCtrl.value = ctrl
if (!formInitialized) {
modeForm.value = { ...ctrl.params, max_amp: ctrl.params.max_amp || 16, phases: ctrl.params.phases || 3 }
modeForm.value = { ...ctrl.params, max_amp: ctrl.params.max_amp || 16, phases: ctrl.params.phases || 3, min_battery_soc: ctrl.params.min_battery_soc || 80, hysteresis: ctrl.params.hysteresis || 15 }
if (ctrl.params.target_soc > 0) { stopMode.value = 'soc'; stopValue.value = ctrl.params.target_soc }
else if (ctrl.params.target_kwh > 0) { stopMode.value = 'kwh'; stopValue.value = ctrl.params.target_kwh }
formInitialized = true