mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
tag in ha object_id
This commit is contained in:
@@ -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)
|
// keep it compatible to v3.4, use english fullname, no prefix (basename prefix commented out)
|
||||||
char object_id[130];
|
char object_id[130];
|
||||||
if (have_tag) {
|
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 {
|
} else {
|
||||||
snprintf(object_id, sizeof(object_id), "%s_%s", device_name, en_name);
|
snprintf(object_id, sizeof(object_id), "%s_%s", device_name, en_name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user