mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Fix for MQTT device tracker adding quotes to payload
This commit is contained in:
@@ -196,7 +196,10 @@ class sensor_config:
|
||||
def publish_mqtt(mqtt_client, topic, message):
|
||||
status = 1
|
||||
|
||||
# convert anything but a simple string to json
|
||||
if not isinstance(message, str):
|
||||
message = json.dumps(message).replace("'",'"')
|
||||
|
||||
qos = get_setting_value('MQTT_QOS')
|
||||
|
||||
mylog('verbose', [f"[{pluginName}] Sending MQTT topic: {topic}"])
|
||||
|
||||
Reference in New Issue
Block a user