change default values for solar+bat mode
This commit is contained in:
@@ -36,7 +36,7 @@ const CHARGING_MODES = [
|
|||||||
{ value: 'solar_battery' as const, label: 'Solar+Batt' },
|
{ value: 'solar_battery' as const, label: 'Solar+Batt' },
|
||||||
]
|
]
|
||||||
const modeForm = ref<ChargingParams>({
|
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,
|
target_kwh: 0, target_soc: 0, phases: 3,
|
||||||
})
|
})
|
||||||
const stopMode = ref<'none' | 'kwh' | 'soc'>('none')
|
const stopMode = ref<'none' | 'kwh' | 'soc'>('none')
|
||||||
@@ -174,7 +174,7 @@ async function refreshCharger() {
|
|||||||
chargerSt.value = st
|
chargerSt.value = st
|
||||||
chargerCtrl.value = ctrl
|
chargerCtrl.value = ctrl
|
||||||
if (!formInitialized) {
|
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 }
|
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 }
|
else if (ctrl.params.target_kwh > 0) { stopMode.value = 'kwh'; stopValue.value = ctrl.params.target_kwh }
|
||||||
formInitialized = true
|
formInitialized = true
|
||||||
|
|||||||
Reference in New Issue
Block a user