From 9bf57c3e220e98df9d46605f5005c10ed27174c8 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 15 Oct 2025 15:09:22 +0200 Subject: [PATCH] dev20, remove `obj_id` again --- src/core/analogsensor.cpp | 1 - src/core/mqtt.cpp | 3 --- src/core/shower.cpp | 2 -- src/core/temperaturesensor.cpp | 1 - src/emsesp_version.h | 2 +- src/web/WebCustomEntityService.cpp | 1 - src/web/WebSchedulerService.cpp | 1 - 7 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/core/analogsensor.cpp b/src/core/analogsensor.cpp index 771c876e6..8aa69c0cc 100644 --- a/src/core/analogsensor.cpp +++ b/src/core/analogsensor.cpp @@ -701,7 +701,6 @@ void AnalogSensor::publish_values(const bool force) { } config["uniq_id"] = uniq_s; - config["obj_id"] = uniq_s; char name[50]; snprintf(name, sizeof(name), "%s", sensor.name().c_str()); diff --git a/src/core/mqtt.cpp b/src/core/mqtt.cpp index 5904664fc..769c2672d 100644 --- a/src/core/mqtt.cpp +++ b/src/core/mqtt.cpp @@ -529,7 +529,6 @@ void Mqtt::ha_status() { } doc["uniq_id"] = uniq; - doc["obj_id"] = uniq; doc["def_ent_id"] = (std::string) "binary_sensor." + uniq; doc["stat_t"] = Mqtt::base() + "/status"; doc["name"] = "System status"; @@ -981,7 +980,6 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev // build the full payload JsonDocument doc; doc["uniq_id"] = uniq_id; - doc["obj_id"] = uniq_id; // set the entity_id. This is breaking change in HA 2025.10.0 - see https://github.com/home-assistant/core/pull/151775 // extract the string from topic up to the / using std::string @@ -1320,7 +1318,6 @@ bool Mqtt::publish_ha_climate_config(const int8_t tag, const bool has_roomtemp, doc["~"] = Mqtt::base(); doc["uniq_id"] = uniq_id_s; - doc["obj_id"] = uniq_id_s; doc["def_ent_id"] = (std::string) "climate." + uniq_id_s; doc["name"] = name_s; doc["mode_stat_t"] = topic_t; diff --git a/src/core/shower.cpp b/src/core/shower.cpp index fa3f5d673..372337311 100644 --- a/src/core/shower.cpp +++ b/src/core/shower.cpp @@ -206,7 +206,6 @@ void Shower::create_ha_discovery() { snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible } doc["uniq_id"] = str; - doc["obj_id"] = str; doc["def_ent_id"] = (std::string) "binary_sensor." + str; snprintf(stat_t, sizeof(stat_t), "%s/shower_active", Mqtt::base().c_str()); @@ -225,7 +224,6 @@ void Shower::create_ha_discovery() { snprintf(str, sizeof(str), "%s_shower_duration", Mqtt::basename().c_str()); doc["uniq_id"] = str; - doc["obj_id"] = str; doc["def_ent_id"] = (std::string) "sensor." + str; snprintf(stat_t, sizeof(stat_t), "%s/shower_data", Mqtt::base().c_str()); diff --git a/src/core/temperaturesensor.cpp b/src/core/temperaturesensor.cpp index 039cda598..89878a95f 100644 --- a/src/core/temperaturesensor.cpp +++ b/src/core/temperaturesensor.cpp @@ -532,7 +532,6 @@ void TemperatureSensor::publish_values(const bool force) { } config["uniq_id"] = uniq_s; - config["obj_id"] = uniq_s; config["def_ent_id"] = (std::string) "sensor." + uniq_s; char name[50]; diff --git a/src/emsesp_version.h b/src/emsesp_version.h index 096657251..d234ddd9b 100644 --- a/src/emsesp_version.h +++ b/src/emsesp_version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.7.3-dev.19" +#define EMSESP_APP_VERSION "3.7.3-dev.20" diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index 61c8e8c77..e81f383c6 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -430,7 +430,6 @@ void WebCustomEntityService::publish(const bool force) { snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(custom), entityItem.name.c_str()); config["uniq_id"] = uniq_s; - config["obj_id"] = uniq_s; config["name"] = entityItem.name.c_str(); char topic[Mqtt::MQTT_TOPIC_MAX_SIZE]; diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index e78aac6c6..616ca95a4 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -283,7 +283,6 @@ void WebSchedulerService::publish(const bool force) { snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(scheduler), scheduleItem.name.c_str()); config["uniq_id"] = uniq_s; - config["obj_id"] = uniq_s; config["name"] = scheduleItem.name.c_str(); config["def_ent_id"] = (std::string) "switch." + uniq_s;