From 70f74ece3aaa29225b696cc63dbd4c11db365c06 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Fri, 30 Dec 2022 18:04:55 +0300 Subject: inverter_bot: add ac_output_voltage in status report --- src/inverter_bot.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/inverter_bot.py b/src/inverter_bot.py index d3ccb8e..fd5acf3 100755 --- a/src/inverter_bot.py +++ b/src/inverter_bot.py @@ -48,6 +48,7 @@ config.load('inverter_bot') bot.initialize() bot.lang.ru( + socket="В розетке", status='Статус', generation='Генерация', priority='Приоритет', @@ -152,6 +153,7 @@ bot.lang.ru( ) bot.lang.en( + socket='AC output', status='Status', generation='Generation', priority='Priority', @@ -775,9 +777,14 @@ def status_handler(ctx: bot.Context) -> None: if gs['grid_voltage']['value'] > 0 or gs['grid_freq']['value'] > 0: ac_mode = getacmode() - html += f'\n{ctx.lang(ac_mode.value)}: %s %s' % (gs['grid_voltage']['unit'], gs['grid_voltage']['value']) + html += f'\n{ctx.lang(ac_mode.value)}: %s %s' % (gs['grid_voltage']['value'], gs['grid_voltage']['unit']) html += ', %s %s' % (gs['grid_freq']['value'], gs['grid_freq']['unit']) + html += f'\n{ctx.lang("socket")}: %s %s, %s %s' % ( + gs['ac_output_voltage']['value'], gs['ac_output_voltage']['unit'], + gs['ac_output_freq']['value'], gs['ac_output_freq']['unit'] + ) + html += f'\n{ctx.lang("priority")}: {rated["output_source_priority"]}' # send response -- cgit v1.2.3