diff --git a/src/WebApi_powerlimiter.cpp b/src/WebApi_powerlimiter.cpp index b13bc0daa..2b11bf169 100644 --- a/src/WebApi_powerlimiter.cpp +++ b/src/WebApi_powerlimiter.cpp @@ -159,6 +159,7 @@ void WebApiPowerLimiterClass::onAdminPost(AsyncWebServerRequest* request) config.PowerLimiter.IsInverterBehindPowerMeter = root["is_inverter_behind_powermeter"].as(); config.PowerLimiter.IsInverterSolarPowered = root["is_inverter_solar_powered"].as(); + config.PowerLimiter.BatteryAlwaysUseAtNight = root["battery_always_use_at_night"].as(); config.PowerLimiter.UseOverscalingToCompensateShading = root["use_overscaling_to_compensate_shading"].as(); config.PowerLimiter.InverterId = root["inverter_serial"].as(); config.PowerLimiter.InverterChannelId = root["inverter_channel_id"].as(); @@ -172,7 +173,6 @@ void WebApiPowerLimiterClass::onAdminPost(AsyncWebServerRequest* request) config.PowerLimiter.IgnoreSoc = root["ignore_soc"].as(); config.PowerLimiter.BatterySocStartThreshold = root["battery_soc_start_threshold"].as(); config.PowerLimiter.BatterySocStopThreshold = root["battery_soc_stop_threshold"].as(); - config.PowerLimiter.BatteryAlwaysUseAtNight = root["battery_always_use_at_night"].as(); if (config.Vedirect.Enabled) { config.PowerLimiter.FullSolarPassThroughSoc = root["full_solar_passthrough_soc"].as(); diff --git a/webapp/src/views/PowerLimiterAdminView.vue b/webapp/src/views/PowerLimiterAdminView.vue index 65d38e8d5..96f51ed46 100644 --- a/webapp/src/views/PowerLimiterAdminView.vue +++ b/webapp/src/views/PowerLimiterAdminView.vue @@ -496,8 +496,7 @@ export default defineComponent({ }, canUseBatteryDischargeAtNight() { const cfg = this.powerLimiterConfigList; - const meta = this.powerLimiterMetaData; - return this.isEnabled() && meta.battery_enabled && !cfg.is_inverter_solar_powered; + return !cfg.is_inverter_solar_powered; }, canUseSolarPassthrough() { const cfg = this.powerLimiterConfigList;