summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-08-08 00:06:37 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-08-08 00:06:37 +0300
commit37b88a1e1c4210429af286ca0b6c8f45adfc68b8 (patch)
tree97e3cf94c252feaff13f23d388889d19ebbee900
parentb601b47a7557c57c317c397ad8efbe9922cca2fc (diff)
some changes
-rw-r--r--main.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.py b/main.py
index 14c8ccf..14517b9 100644
--- a/main.py
+++ b/main.py
@@ -106,6 +106,7 @@ def msg_status(update: Update, context: CallbackContext) -> None:
relay.connect()
status = relay.status()
+ logging.info('status:' + status)
status = 'Включен' if status == 'on' else 'Выключен'
reply(update, status)
@@ -118,8 +119,8 @@ def msg_on(update: Update, context: CallbackContext) -> None:
relay = RelayClient()
relay.connect()
- resp = relay.on()
- reply(update, resp)
+ relay.on()
+ reply(update, 'Готово')
except Exception as e:
handle_exc(update, e)
@@ -129,8 +130,8 @@ def msg_off(update: Update, context: CallbackContext) -> None:
relay = RelayClient()
relay.connect()
- resp = relay.off()
- reply(update, resp)
+ relay.off()
+ reply(update, 'Готово')
except Exception as e:
handle_exc(update, e)