mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fix uniq_id for HA sensors
This commit is contained in:
@@ -986,7 +986,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
|
|
||||||
// create entity by add the hc/wwc tag if present, separating with an _
|
// create entity by add the hc/wwc tag if present, separating with an _
|
||||||
char entity_with_tag[50];
|
char entity_with_tag[50];
|
||||||
if (has_tag) {
|
if (tag >= DeviceValueTAG::TAG_HC1) {
|
||||||
snprintf(entity_with_tag, sizeof(entity_with_tag), "%s_%s", EMSdevice::tag_to_mqtt(tag), entity);
|
snprintf(entity_with_tag, sizeof(entity_with_tag), "%s_%s", EMSdevice::tag_to_mqtt(tag), entity);
|
||||||
} else {
|
} else {
|
||||||
snprintf(entity_with_tag, sizeof(entity_with_tag), "%s", entity);
|
snprintf(entity_with_tag, sizeof(entity_with_tag), "%s", entity);
|
||||||
|
|||||||
Reference in New Issue
Block a user