Skip to content

Commit

Permalink
allow 'use battery at night' when no battery is connected
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBoehm committed Aug 18, 2024
1 parent 7b55794 commit 4f50cd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/WebApi_powerlimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ void WebApiPowerLimiterClass::onAdminPost(AsyncWebServerRequest* request)

config.PowerLimiter.IsInverterBehindPowerMeter = root["is_inverter_behind_powermeter"].as<bool>();
config.PowerLimiter.IsInverterSolarPowered = root["is_inverter_solar_powered"].as<bool>();
config.PowerLimiter.BatteryAlwaysUseAtNight = root["battery_always_use_at_night"].as<bool>();
config.PowerLimiter.UseOverscalingToCompensateShading = root["use_overscaling_to_compensate_shading"].as<bool>();
config.PowerLimiter.InverterId = root["inverter_serial"].as<uint64_t>();
config.PowerLimiter.InverterChannelId = root["inverter_channel_id"].as<uint8_t>();
Expand All @@ -172,7 +173,6 @@ void WebApiPowerLimiterClass::onAdminPost(AsyncWebServerRequest* request)
config.PowerLimiter.IgnoreSoc = root["ignore_soc"].as<bool>();
config.PowerLimiter.BatterySocStartThreshold = root["battery_soc_start_threshold"].as<uint32_t>();
config.PowerLimiter.BatterySocStopThreshold = root["battery_soc_stop_threshold"].as<uint32_t>();
config.PowerLimiter.BatteryAlwaysUseAtNight = root["battery_always_use_at_night"].as<bool>();

if (config.Vedirect.Enabled) {
config.PowerLimiter.FullSolarPassThroughSoc = root["full_solar_passthrough_soc"].as<uint32_t>();
Expand Down
3 changes: 1 addition & 2 deletions webapp/src/views/PowerLimiterAdminView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4f50cd9

Please sign in to comment.