mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
(v2) add GPIOs to WebUI as configurable options (LED, Rx, Tx, Dallas sensor) #466
This commit is contained in:
@@ -36,7 +36,9 @@ void Sensors::start() {
|
||||
reload();
|
||||
|
||||
#ifndef EMSESP_STANDALONE
|
||||
bus_.begin(SENSOR_GPIO);
|
||||
if (dallas_gpio_) {
|
||||
bus_.begin(dallas_gpio_);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -47,6 +49,8 @@ void Sensors::reload() {
|
||||
mqtt_format_ = settings.mqtt_format; // single, nested or ha
|
||||
});
|
||||
|
||||
EMSESP::emsespSettingsService.read([&](EMSESPSettings & settings) { dallas_gpio_ = settings.dallas_gpio; });
|
||||
|
||||
if (mqtt_format_ == MQTT_format::HA) {
|
||||
for (uint8_t i = 0; i < MAX_SENSORS; registered_ha_[i++] = false)
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user