From 1b8237280d10f4ed19facceb5441243471536e5f Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 22 Oct 2022 19:33:40 +0300 Subject: inverter: improve util program --- src/home/inverter/monitor.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/home') diff --git a/src/home/inverter/monitor.py b/src/home/inverter/monitor.py index 898c998..f661d73 100644 --- a/src/home/inverter/monitor.py +++ b/src/home/inverter/monitor.py @@ -474,6 +474,9 @@ class InverterMonitor(Thread): def set_ac_mode(self, mode: ACMode): self.ac_mode = mode + def notify_osp(self, osp: OutputSourcePriority): + self.osp = osp + def stop(self): self.interrupted = True @@ -491,6 +494,7 @@ class InverterMonitor(Thread): 'time_now': time.time(), 'next_current_enter_time': self.next_current_enter_time, 'ac_mode': self.ac_mode, + 'osp': self.osp, 'util_ac_present': self.util_ac_present, 'util_pd': self.util_pd.name, 'util_solar': self.util_solar -- cgit v1.2.3