mirror of
https://gitlab.sectorq.eu/jaydee/mqtt_srv.git
synced 2025-12-14 10:34:53 +01:00
vars
This commit is contained in:
@@ -917,9 +917,9 @@ def on_message(client, userdata, msg):
|
||||
print("not a json!")
|
||||
|
||||
client = mqtt.Client()
|
||||
payload = "off"
|
||||
payload = '{"status": "off"}'
|
||||
client.username_pw_set("jaydee", password="jaydee1")
|
||||
client.will_set("sectorq/systems/" + host.lower() + "/stat", payload=payload, qos=0, retain=True)
|
||||
client.will_set("home-assistant/" + host.lower() + "/hwstats", payload=payload, qos=0, retain=True)
|
||||
client.on_connect = on_connect
|
||||
client.on_message = on_message
|
||||
writeLog(MQTT_HOST)
|
||||
|
||||
Reference in New Issue
Block a user