Fix bitlair state topic
This commit is contained in:
parent
223fd9508c
commit
1bae2d2c02
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -94,7 +94,7 @@ async def np(ctx):
|
||||||
#
|
#
|
||||||
# subscribe to topics
|
# subscribe to topics
|
||||||
def on_connect(client, userdata, flags, rc):
|
def on_connect(client, userdata, flags, rc):
|
||||||
client.subscribe("bitlair/state/bitlair")
|
client.subscribe("bitlair/state")
|
||||||
client.subscribe("bitlair/state/djo")
|
client.subscribe("bitlair/state/djo")
|
||||||
client.subscribe("bitlair/photos")
|
client.subscribe("bitlair/photos")
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ def on_message(client, userdata, msg):
|
||||||
topic = msg.topic
|
topic = msg.topic
|
||||||
msg = msg.payload.decode()
|
msg = msg.payload.decode()
|
||||||
|
|
||||||
if topic == 'bitlair/state/bitlair':
|
if topic == 'bitlair/state':
|
||||||
webhook_message('Bitlair is now %s' % msg.upper())
|
webhook_message('Bitlair is now %s' % msg.upper())
|
||||||
elif topic == 'bitlair/state/djo':
|
elif topic == 'bitlair/state/djo':
|
||||||
webhook_message('DJO is now %s' % msg.upper())
|
webhook_message('DJO is now %s' % msg.upper())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue