From bdbb296697f55f4c3a07af43c9aaf7a9ea86f3d0 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 17 Sep 2023 04:48:05 +0300 Subject: fix --- bin/lugovaya_pump_mqtt_bot.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/lugovaya_pump_mqtt_bot.py b/bin/lugovaya_pump_mqtt_bot.py index 72a2e87..85402d1 100755 --- a/bin/lugovaya_pump_mqtt_bot.py +++ b/bin/lugovaya_pump_mqtt_bot.py @@ -173,7 +173,13 @@ def exception_handler(e: Exception, ctx: bot.Context) -> bool: @bot.defaultreplymarkup def markup(ctx: Optional[bot.Context]) -> Optional[ReplyKeyboardMarkup]: - buttons = [[ctx.lang('enable'), ctx.lang('disable')], [ctx.lang('status')]] + buttons = [ + [ + ctx.lang('enable'), + ctx.lang('disable') + ], + # [ctx.lang('status')] + ] # if ctx.user_id in config['bot']['admin_users']: # buttons.append([ctx.lang('management')]) return ReplyKeyboardMarkup(buttons, one_time_keyboard=False) @@ -191,7 +197,7 @@ try: except KeyError: pass relay_module = mqtt_node.load_module('relay', **module_kwargs) -mqtt_node.add_payload_callback(on_mqtt_message) +# mqtt_node.add_payload_callback(on_mqtt_message) mqtt.add_node(mqtt_node) mqtt.connect_and_loop(loop_forever=False) -- cgit v1.2.3