добавляет MQTT Discovery

This commit is contained in:
2022-06-02 22:49:47 +03:00
parent 1997b8c2d9
commit 283016d424
6 changed files with 109 additions and 44 deletions

14
include/config.h.tmpl Normal file
View File

@@ -0,0 +1,14 @@
// Настройки WiFi
#define WIFI_SSID "SSID_HERE"
#define WIFI_PASS "PASS_HERE"
// Сервер MQTT
#define MQTT_SERVER "MQTT_SERVER_HERE"
#define MQTT_PORT 5319
#define MQTT_LOGIN "MQTT_LOGIN_HERE"
#define MQTT_PASS "MQTT_PASS_HERE"
#define DHTPIN D4 // pin gpio 2 in sensor
#define DHTTYPE DHT22 // DHT 22 Change this if you have a DHT11
#define HOMEASSISTANT_TOPIC "homeassistant/sensor/sensorDht"

6
include/utils.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef UTILS_H
#define UTILS_H
double round2(double value);
#endif