Compare commits
No commits in common. "d6e62544dba35967e087df210509871b64470dc3" and "bde5e940c825478ae5b0c097765472f07e644b8a" have entirely different histories.
d6e62544db
...
bde5e940c8
2 changed files with 4 additions and 5 deletions
|
@ -1,10 +1,9 @@
|
|||
#!/bin/python
|
||||
|
||||
import time
|
||||
import paho.mqtt.client as mqtt
|
||||
import argparse
|
||||
import json
|
||||
import time
|
||||
|
||||
import paho.mqtt.client as mqtt
|
||||
|
||||
import mqtt_client
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class MqttClient:
|
|||
self.mixer = Mixer(mixer_ip)
|
||||
self.client = mqtt.Client(callback_api_version=mqtt.CallbackAPIVersion.VERSION2)
|
||||
|
||||
def mqtt_autodiscovery(self):
|
||||
def mqtt_autodiscovery(self, client):
|
||||
j = json.dumps(
|
||||
{
|
||||
"name": "Reset Settings",
|
||||
|
@ -33,7 +33,7 @@ class MqttClient:
|
|||
}
|
||||
)
|
||||
|
||||
self.client.publish(self.MQTT_DISCOVERY_TOPIC, payload=j, qos=0, retain=False)
|
||||
self, client.publish(self.MQTT_DISCOVERY_TOPIC, payload=j, qos=0, retain=False)
|
||||
|
||||
def on_connect(self, client, userdata, flags, reason_code, properties):
|
||||
print(f"Connected: {reason_code}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue