diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-08-28 19:01:47 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-08-28 19:01:47 +0300 |
commit | 4ed7e6859a6764fec09720d6b51a69a017ccd03f (patch) | |
tree | 9738d2feb526bf614ace905f86708bdbe75b862b /src | |
parent | da33a5b99bcda1802fbd1ede65c7b4553711d73e (diff) |
inverter/monitor: set min charging current when done
Diffstat (limited to 'src')
-rw-r--r-- | src/home/inverter/monitor.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/home/inverter/monitor.py b/src/home/inverter/monitor.py index 952b8c8..3835365 100644 --- a/src/home/inverter/monitor.py +++ b/src/home/inverter/monitor.py @@ -271,7 +271,7 @@ class InverterMonitor(Thread): if self.next_current_enter_time != 0 and pd != BatteryPowerDirection.CHARGING: # Generator was warming up and charging, but stopped (pd has changed). - # Resetting to the minimum possible pd + # Resetting to the minimum possible current logger.info(f'gen_charging_program (warming path): was charging but power direction suddeny changed. resetting to minimum current') self.next_current_enter_time = 0 self.gen_next_current(current=self.min_allowed_current) @@ -355,6 +355,8 @@ class InverterMonitor(Thread): self.floating_stopwatch.reset() self.current_change_direction = CurrentChangeDirection.UP + self.set_hw_charging_current(self.min_allowed_current) + def gen_next_current(self, current=None): if current is None: try: |