add mqtt, decouple i2c and sensor

This commit is contained in:
2025-11-10 22:40:21 +06:00
parent 80478c7400
commit fe6cc2ebb9
8 changed files with 466 additions and 231 deletions

13
inc/ha_mqtt.h Normal file
View File

@@ -0,0 +1,13 @@
// ha_mqtt.h
#ifndef HA_MQTT_H
#define HA_MQTT_H
#include <stdint.h>
void ha_mqtt_init(void);
void ha_mqtt_publish_sensor_data(int32_t temp_x100, int32_t hum_x100);
void ha_mqtt_check_and_reconnect(void);
uint8_t ha_mqtt_is_connected(void);
#endif // HA_MQTT_H