En-tag for HA-entity

This commit is contained in:
MichaelDvP
2022-11-14 12:22:12 +01:00
parent b12729a874
commit 5bda018d25
3 changed files with 4 additions and 4 deletions

View File

@@ -1091,7 +1091,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice
// keep it compatible to v3.4, use english fullname, no prefix (basename prefix commented out)
char object_id[130];
if (have_tag) {
snprintf(object_id, sizeof(object_id), "%s_%s_%s", device_name, EMSdevice::tag_to_mqtt(tag).c_str(), en_name);
snprintf(object_id, sizeof(object_id), "%s_%s_%s", device_name, EMSdevice::tag_to_string(tag, false).c_str(), en_name);
} else {
snprintf(object_id, sizeof(object_id), "%s_%s", device_name, en_name);
}