inverter_bot: add ac_output_voltage in status report
This commit is contained in:
parent
8212feaa6e
commit
70f74ece3a
@ -48,6 +48,7 @@ config.load('inverter_bot')
|
|||||||
|
|
||||||
bot.initialize()
|
bot.initialize()
|
||||||
bot.lang.ru(
|
bot.lang.ru(
|
||||||
|
socket="В розетке",
|
||||||
status='Статус',
|
status='Статус',
|
||||||
generation='Генерация',
|
generation='Генерация',
|
||||||
priority='Приоритет',
|
priority='Приоритет',
|
||||||
@ -152,6 +153,7 @@ bot.lang.ru(
|
|||||||
)
|
)
|
||||||
|
|
||||||
bot.lang.en(
|
bot.lang.en(
|
||||||
|
socket='AC output',
|
||||||
status='Status',
|
status='Status',
|
||||||
generation='Generation',
|
generation='Generation',
|
||||||
priority='Priority',
|
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:
|
if gs['grid_voltage']['value'] > 0 or gs['grid_freq']['value'] > 0:
|
||||||
ac_mode = getacmode()
|
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 += ', %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"]}'
|
html += f'\n<b>{ctx.lang("priority")}</b>: {rated["output_source_priority"]}'
|
||||||
|
|
||||||
# send response
|
# send response
|
||||||
|
Loading…
x
Reference in New Issue
Block a user