removed topic decode

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-01 22:42:07 +02:00
parent 225f80587b
commit b3a0e08cdb
1 changed files with 2 additions and 2 deletions

View File

@ -68,9 +68,9 @@ def mqtt_on_connect(client, userdata, flags, rc):
client.subscribe("server-rack-led-1/b")
def mqtt_on_message(client, userdata, msg):
print("topic: " ,str(msg.topic.decode("utf-8")))
print("topic: " ,str(msg.topic))
print("payload: " ,str(msg.payload.decode("utf-8")))
topic = str(msg.topic.decode("utf-8"))
topic = str(msg.topic)
payload = str(msg.payload.decode("utf-8"))
if topic == "server-rack-led-1/power":
power = payload