diff --git a/mqtt.py b/mqtt.py index 9d87461..04ed5df 100644 --- a/mqtt.py +++ b/mqtt.py @@ -1,5 +1,4 @@ import random -import time import json from paho.mqtt import client as mqtt_client @@ -40,10 +39,10 @@ def connect_mqtt() -> mqtt_client: def publish(client): - result = client.publish("ledLight/state", "on") + result = client.publish("ledLight/state", "ON") status = result[0] if status == 0: - print(f"Send `on` to topic `{topic}`") + print(f"Send `ON` to topic `{topic}`") else: print(f"Failed to send message to topic {topic}")