summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-09-17 04:48:05 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-09-17 04:48:05 +0300
commitbdbb296697f55f4c3a07af43c9aaf7a9ea86f3d0 (patch)
treeb91a7b234126c63ed0126a4d72687986cfd18cfc
parent9b78ccca3546f93955571f4a20a44a1739e718b8 (diff)
fix
-rwxr-xr-xbin/lugovaya_pump_mqtt_bot.py10
1 files 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)