Fix JSON payload
This commit is contained in:
parent
fe8c948676
commit
17a22dfb1b
|
@ -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),
|
||||
},
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue