Skip to content

Commit

Permalink
fixes #833
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Dec 25, 2022
1 parent 9b3b7fc commit 8343812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
}

// build unique identifier also used as object_id and becomes the Entity ID in HA
char uniq_id[70];
char uniq_id[80];
if (Mqtt::entity_format() == 2) {
// prefix base name to each uniq_id and use the shortname
snprintf(uniq_id, sizeof(uniq_id), "%s_%s_%s", mqtt_basename_.c_str(), device_name, entity_with_tag);
Expand All @@ -998,7 +998,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
// entity_format is 0
// old v3.4 style
// take en_name and replace all spaces and lowercase it
char uniq_s[40];
char uniq_s[60];
strlcpy(uniq_s, en_name, sizeof(uniq_s));
Helpers::replace_char(uniq_s, ' ', '_');
if (EMSdevice::tag_to_string(tag).empty()) {
Expand Down

0 comments on commit 8343812

Please sign in to comment.