mqtt_client.py: mqtt_autodiscovery: remove client arg
This commit is contained in:
parent
bde5e940c8
commit
eafc71d4f2
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ class MqttClient:
|
||||||
self.mixer = Mixer(mixer_ip)
|
self.mixer = Mixer(mixer_ip)
|
||||||
self.client = mqtt.Client(callback_api_version=mqtt.CallbackAPIVersion.VERSION2)
|
self.client = mqtt.Client(callback_api_version=mqtt.CallbackAPIVersion.VERSION2)
|
||||||
|
|
||||||
def mqtt_autodiscovery(self, client):
|
def mqtt_autodiscovery(self):
|
||||||
j = json.dumps(
|
j = json.dumps(
|
||||||
{
|
{
|
||||||
"name": "Reset Settings",
|
"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):
|
def on_connect(self, client, userdata, flags, reason_code, properties):
|
||||||
print(f"Connected: {reason_code}")
|
print(f"Connected: {reason_code}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue