summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-08-08 00:07:28 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-08-08 00:07:28 +0300
commit97d9aebe2fb231b2471db300db2be9387ce77b64 (patch)
tree15f5c74892ea86b833eb0de84ccf07a6732ad292
parent37b88a1e1c4210429af286ca0b6c8f45adfc68b8 (diff)
fix a bug
-rw-r--r--main.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.py b/main.py
index 14517b9..60df15d 100644
--- a/main.py
+++ b/main.py
@@ -105,9 +105,8 @@ def msg_status(update: Update, context: CallbackContext) -> None:
relay = RelayClient()
relay.connect()
- status = relay.status()
- logging.info('status:' + status)
- status = 'Включен' if status == 'on' else 'Выключен'
+ response = relay.status()
+ status = 'Включен' if response == 'on' else 'Выключен'
reply(update, status)
except Exception as e: