Whole oven_state pushed to mqtt

pull/217/head
mlodedrwale 2025-06-12 18:28:16 +01:00
rodzic 2fd10d5bfb
commit 1a7df4e1fd
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -71,10 +71,8 @@ class OvenWatcher(threading.Thread):
# Publish temperature to MQTT topic
if config.mqtt_enabled:
payload = json.dumps({
"name": config.mqtt_kiln_name,
"value": oven_state['temperature']
})
oven_state["name"] = config.mqtt_kiln_name
payload = json.dumps(oven_state)
result = self.client.publish(config.mqtt_topic, payload)
if result.rc != mqtt.MQTT_ERR_SUCCESS:
log.error(f"Publish failed, code: {result.rc}")