Fix JSON payload

This commit is contained in:
Scott Wallace 2022-12-10 15:44:17 +00:00
parent fe8c948676
commit 17a22dfb1b
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

View file

@ -1,6 +1,7 @@
"""
Read Xiaomi LYWSD03MMC advertised packets and send them to MQTT
"""
import json
import os
from socket import gaierror
from typing import TypedDict
@ -54,7 +55,7 @@ def send_to_mqtt(data: MQTTdata) -> None:
},
{
"topic": "sensors/home/{data['mac']}/tele/SENSOR",
"payload": data,
"payload": json.dumps(data),
},
]