From f6a9acc228b25e5928b7480b99ad3f26a7218106 Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Tue, 7 Oct 2025 00:42:03 -0400 Subject: [PATCH] mqtt --- ESP32-IDF_Temperture-Node-v2/main/mqttronix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ESP32-IDF_Temperture-Node-v2/main/mqttronix.c b/ESP32-IDF_Temperture-Node-v2/main/mqttronix.c index 9b9c6a299..47d1a79a1 100644 --- a/ESP32-IDF_Temperture-Node-v2/main/mqttronix.c +++ b/ESP32-IDF_Temperture-Node-v2/main/mqttronix.c @@ -82,4 +82,7 @@ void mqttronix_start(void) { esp_mqtt_client_start(client); } -void mqttronix_update_temp (float temp) { temp_value = temp; } \ No newline at end of file +void mqttronix_update_temp (float temp) { + temp_value = temp; + snprintf(temp_str, sizeof(temp_str), "%.02f", temp_value); +} \ No newline at end of file