From ecafda86f180e9ec98bd5b87bbb3d4aa42569499 Mon Sep 17 00:00:00 2001 From: pswid <78219494+pswid@users.noreply.github.com> Date: Sun, 12 Mar 2023 19:14:28 +0100 Subject: [PATCH] fix: tags in names in HA were not translated --- src/mqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 00039d1d7..a665fa163 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -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 }