mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2
This commit is contained in:
@@ -922,9 +922,9 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
||||
if (EMSESP::system_.enum_format() == ENUM_FORMAT_INDEX) {
|
||||
// use index numbers
|
||||
for (uint8_t i = 0; i < options_size; i++) {
|
||||
option_list.add(i);
|
||||
option_list.add(Helpers::itoa(i)); // as a string
|
||||
}
|
||||
snprintf(sample_val, sizeof(sample_val), "0");
|
||||
snprintf(sample_val, sizeof(sample_val), "'0'");
|
||||
} else {
|
||||
// use strings
|
||||
for (uint8_t i = 0; i < options_size; i++) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.6.1-dev.2"
|
||||
#define EMSESP_APP_VERSION "3.7.0-dev.0"
|
||||
|
||||
@@ -220,6 +220,12 @@ void WebSchedulerService::publish_single(const char * name, const bool state) {
|
||||
|
||||
// publish to Mqtt
|
||||
void WebSchedulerService::publish(const bool force) {
|
||||
if (force) {
|
||||
ha_registered_ = false;
|
||||
}
|
||||
if (!Mqtt::enabled()) {
|
||||
return;
|
||||
}
|
||||
EMSESP::webSchedulerService.read([&](WebScheduler & webScheduler) { scheduleItems = &webScheduler.scheduleItems; });
|
||||
if (scheduleItems->size() == 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user