diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-10-29 15:42:09 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-10-29 15:42:09 +0300 |
commit | 0fce6c52516aba239acc81fd528dcb5051c04f68 (patch) | |
tree | 2230dfe1d3102cc28537d6e566952dd6ae1a1e44 /src/inverter_bot.py | |
parent | dbc33cf2293238534fd4d268e6a6d9405daae758 (diff) |
inverter_bot: add current OSP to status output
Diffstat (limited to 'src/inverter_bot.py')
-rwxr-xr-x | src/inverter_bot.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/inverter_bot.py b/src/inverter_bot.py index 223c7b3..3df720c 100755 --- a/src/inverter_bot.py +++ b/src/inverter_bot.py @@ -176,6 +176,7 @@ def build_flags_keyboard(flags: dict, ctx: Context) -> Tuple[str, InlineKeyboard def status(ctx: Context) -> None: gs = inverter.exec('get-status')['data'] + rated = inverter.exec('get-rated')['data'] # render response power_direction = gs['battery_power_direction'].lower() @@ -209,6 +210,8 @@ def status(ctx: Context) -> None: html += f'\n<b>{ctx.lang(ac_mode.value)}:</b> %s %s' % (gs['grid_voltage']['unit'], gs['grid_voltage']['value']) html += ', %s %s' % (gs['grid_freq']['value'], gs['grid_freq']['unit']) + html += f'\n<b>{ctx.lang("priority")}</b>: {rated["output_source_priority"]}' + # send response ctx.reply(html) @@ -495,6 +498,7 @@ class InverterBot(Wrapper): self.lang.ru( status='Статус', generation='Генерация', + priority='Приоритет', osp='Приоритет питания нагрузки', battery="АКБ", load="Нагрузка", @@ -573,6 +577,7 @@ class InverterBot(Wrapper): self.lang.en( status='Status', generation='Generation', + priority='Priority', osp='Output source priority', battery="Battery", load="Load", |