From a89a7b5430f95b4d635ada381fda445b69c7e4a3 Mon Sep 17 00:00:00 2001 From: Proddy Date: Thu, 23 Feb 2023 19:57:35 +0100 Subject: [PATCH] fix uniq_id for HA sensors --- src/mqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 1964bdd56..2430b1c04 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -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 _ 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); } else { snprintf(entity_with_tag, sizeof(entity_with_tag), "%s", entity);