diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-08-21 22:10:13 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-08-21 22:10:13 +0300 |
commit | e636419bd2598d9a3cfccfba21b07db68c0f53fd (patch) | |
tree | dd0c0115589d396907c18de45962cfc8d681404f /src/home | |
parent | 43895519a718810fc0ac0defd76047e0fd6229d9 (diff) |
inverter/monitor: gen_stop(): always reset state
Diffstat (limited to 'src/home')
-rw-r--r-- | src/home/inverter/monitor.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/home/inverter/monitor.py b/src/home/inverter/monitor.py index daa7d0c..952b8c8 100644 --- a/src/home/inverter/monitor.py +++ b/src/home/inverter/monitor.py @@ -349,12 +349,11 @@ class InverterMonitor(Thread): logger.info(f'charging is finished, entering {reason} state') self.charging_event_handler(event) - # Let Mr. Proper do his job - if self.active_current_idx != -1: - self.next_current_enter_time = 0 - self.mostly_charged = False - self.active_current_idx = -1 - self.floating_stopwatch.reset() + self.next_current_enter_time = 0 + self.mostly_charged = False + self.active_current_idx = -1 + self.floating_stopwatch.reset() + self.current_change_direction = CurrentChangeDirection.UP def gen_next_current(self, current=None): if current is None: |