summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-12-30 18:04:55 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-12-30 18:04:55 +0300
commit70f74ece3aaa29225b696cc63dbd4c11db365c06 (patch)
tree74b159f2d8b2ee7994e7f631a3f28230cb963548
parent8212feaa6e05735eb54a681ec8aed55c60bd7b57 (diff)
inverter_bot: add ac_output_voltage in status report
-rwxr-xr-xsrc/inverter_bot.py9
1 files changed, 8 insertions, 1 deletions
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<b>{ctx.lang(ac_mode.value)}:</b> %s %s' % (gs['grid_voltage']['unit'], gs['grid_voltage']['value'])
+ html += f'\n<b>{ctx.lang(ac_mode.value)}:</b> %s %s' % (gs['grid_voltage']['value'], gs['grid_voltage']['unit'])
html += ', %s %s' % (gs['grid_freq']['value'], gs['grid_freq']['unit'])
+ html += f'\n<b>{ctx.lang("socket")}</b>: %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<b>{ctx.lang("priority")}</b>: {rated["output_source_priority"]}'
# send response