fix: tags in names in HA were not translated

This commit is contained in:
pswid
2023-03-12 19:14:28 +01:00
parent 94678a6726
commit ecafda86f1

View File

@@ -1152,7 +1152,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
Helpers::CharToUpperUTF8(F_name); // capitalize first letter
if (has_tag) {
// exclude heartbeat tag
snprintf(ha_name, sizeof(ha_name), "%s %s", DeviceValue::DeviceValueTAG_s[tag][0], F_name);
snprintf(ha_name, sizeof(ha_name), "%s %s", EMSdevice::tag_to_string(tag), F_name);
} else {
snprintf(ha_name, sizeof(ha_name), "%s", F_name); // no tag
}