Skip to content

Commit

Permalink
rename option for system with no AC-in loads
Browse files Browse the repository at this point in the history
Make option name more specific to Loads rather than entire system,
since a PV-inverter is allowed before the inverter/charger.

victronenergy/venus#1328
  • Loading branch information
izak committed Sep 12, 2024
1 parent 8cc1f46 commit d22ffeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dbus_systemcalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def __init__(self):
'batteryservice': ['/Settings/SystemSetup/BatteryService', self.BATSERVICE_DEFAULT, 0, 0],
'hasdcsystem': ['/Settings/SystemSetup/HasDcSystem', 0, 0, 1],
'useacout': ['/Settings/SystemSetup/HasAcOutSystem', 1, 0, 1],
'hasacinsys': ['/Settings/SystemSetup/HasAcInSystem', 1, 0, 1],
'hasacinloads': ['/Settings/SystemSetup/HasAcInLoads', 1, 0, 1],
'gaugeautomax': ['/Settings/Gui/Gauges/AutoMax', 1, 0, 1],
'acin0min': ['/Settings/Gui/Gauges/Ac/In/0/Current/Min', float(0), -float("inf"), 0],
'acin1min': ['/Settings/Gui/Gauges/Ac/In/1/Current/Min', float(0), -float("inf"), 0],
Expand Down Expand Up @@ -952,7 +952,7 @@ def _updatevalues(self):
# If a system has no loads/generation on the input side, we can
# assume ConsumptionOnInput to be invalid. This also implies that
# everything must be on AC-out then.
has_ac_in_system = self._settings['hasacinsys'] == 1
has_ac_in_system = self._settings['hasacinloads'] == 1

# If we have an ESS system and RunWithoutGridMeter is set, there cannot be load on the AC-In, so it
# must be on AC-Out. Hence we do calculate AC-Out consumption even if 'useacout' is disabled.
Expand Down
2 changes: 1 addition & 1 deletion tests/systemcalc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ def test_multi_rs_3phase_summing(self):
})

def test_no_input_acloads_in_system(self):
self._set_setting('/Settings/SystemSetup/HasAcInSystem', 0)
self._set_setting('/Settings/SystemSetup/HasAcInLoads', 0)
self._add_device('com.victronenergy.grid.ttyUSB1', {'/Ac/L1/Power': 1230, '/Ac/L1/Current': 5.1})
self._update_values()
self._check_values({
Expand Down

0 comments on commit d22ffeb

Please sign in to comment.