tag in ha object_id

This commit is contained in:
MichaelDvP
2022-11-13 19:09:32 +01:00
parent 33d2cb9a49
commit 9865c84df5

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_string(tag).c_str(), en_name);
snprintf(object_id, sizeof(object_id), "%s_%s_%s", device_name, EMSdevice::tag_to_mqtt(tag).c_str(), en_name);
} else {
snprintf(object_id, sizeof(object_id), "%s_%s", device_name, en_name);
}