Skip to content

Commit

Permalink
fix for MQTT enum index option leads to error in HA emsesp#1280
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 9, 2023
1 parent f462afb commit 09ff892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ 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");
} else {
Expand Down

0 comments on commit 09ff892

Please sign in to comment.