Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pitte
bits-companion
Commits
59468de5
Verified
Commit
59468de5
authored
Oct 27, 2021
by
Mroik
Browse files
Small fix
parent
99101d26
Changes
1
Show whitespace changes
Inline
Side-by-side
tgbot/handlers.py
View file @
59468de5
...
...
@@ -62,6 +62,7 @@ def set_closed(update: Update, context: CallbackContext):
def
set_status
(
status
:
bool
,
update
:
Update
,
context
:
CallbackContext
):
global
is_open
LOGGER
.
debug
(
f
"Trying to set status to
{
status
}
"
)
if
check_debounce
():
LOGGER
.
debug
(
"Debounce triggered"
)
...
...
@@ -74,4 +75,5 @@ def set_status(status: bool, update: Update, context: CallbackContext):
resp
=
mt
.
bot
.
mqtt
.
publish
(
"sede/status"
,
payload
=
json
.
dumps
(
{
"id"
:
"Set from telegram"
,
"status"
:
OPEN
if
status
else
CLOSED
}
))
is_open
=
status
LOGGER
.
info
(
resp
.
mid
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment