From ac76b1c1153ae1f93d880b625112965d5661a680 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 6 Nov 2022 21:01:32 +0300 Subject: inverter_bot: fix monitor --- src/inverter_bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/inverter_bot.py b/src/inverter_bot.py index c2e138f..807710d 100755 --- a/src/inverter_bot.py +++ b/src/inverter_bot.py @@ -915,7 +915,7 @@ if __name__ == '__main__': inverter.init(host=config['inverter']['ip'], port=config['inverter']['port']) bot.set_database(InverterStore()) - # bot.enable_logging(BotType.INVERTER) + bot.enable_logging(BotType.INVERTER) bot.add_conversation(SettingsConversation(enable_back=True)) bot.add_conversation(ConsumptionConversation(enable_back=True)) @@ -928,10 +928,11 @@ if __name__ == '__main__': monitor.set_osp_need_change_callback(osp_change_cb) setacmode(getacmode()) - bot.run() if not config.get('monitor.disabled'): logging.info('starting monitor') monitor.start() + bot.run() + monitor.stop() -- cgit v1.2.3