dev20, remove obj_id again

This commit is contained in:
MichaelDvP
2025-10-15 15:09:22 +02:00
parent 766281d8d2
commit 9bf57c3e22
7 changed files with 1 additions and 10 deletions

View File

@@ -701,7 +701,6 @@ void AnalogSensor::publish_values(const bool force) {
} }
config["uniq_id"] = uniq_s; config["uniq_id"] = uniq_s;
config["obj_id"] = uniq_s;
char name[50]; char name[50];
snprintf(name, sizeof(name), "%s", sensor.name().c_str()); snprintf(name, sizeof(name), "%s", sensor.name().c_str());

View File

@@ -529,7 +529,6 @@ void Mqtt::ha_status() {
} }
doc["uniq_id"] = uniq; doc["uniq_id"] = uniq;
doc["obj_id"] = uniq;
doc["def_ent_id"] = (std::string) "binary_sensor." + uniq; doc["def_ent_id"] = (std::string) "binary_sensor." + uniq;
doc["stat_t"] = Mqtt::base() + "/status"; doc["stat_t"] = Mqtt::base() + "/status";
doc["name"] = "System status"; doc["name"] = "System status";
@@ -981,7 +980,6 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
// build the full payload // build the full payload
JsonDocument doc; JsonDocument doc;
doc["uniq_id"] = uniq_id; 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 // 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 // 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["~"] = Mqtt::base();
doc["uniq_id"] = uniq_id_s; doc["uniq_id"] = uniq_id_s;
doc["obj_id"] = uniq_id_s;
doc["def_ent_id"] = (std::string) "climate." + uniq_id_s; doc["def_ent_id"] = (std::string) "climate." + uniq_id_s;
doc["name"] = name_s; doc["name"] = name_s;
doc["mode_stat_t"] = topic_t; doc["mode_stat_t"] = topic_t;

View File

@@ -206,7 +206,6 @@ void Shower::create_ha_discovery() {
snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible
} }
doc["uniq_id"] = str; doc["uniq_id"] = str;
doc["obj_id"] = str;
doc["def_ent_id"] = (std::string) "binary_sensor." + str; doc["def_ent_id"] = (std::string) "binary_sensor." + str;
snprintf(stat_t, sizeof(stat_t), "%s/shower_active", Mqtt::base().c_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()); snprintf(str, sizeof(str), "%s_shower_duration", Mqtt::basename().c_str());
doc["uniq_id"] = str; doc["uniq_id"] = str;
doc["obj_id"] = str;
doc["def_ent_id"] = (std::string) "sensor." + str; doc["def_ent_id"] = (std::string) "sensor." + str;
snprintf(stat_t, sizeof(stat_t), "%s/shower_data", Mqtt::base().c_str()); snprintf(stat_t, sizeof(stat_t), "%s/shower_data", Mqtt::base().c_str());

View File

@@ -532,7 +532,6 @@ void TemperatureSensor::publish_values(const bool force) {
} }
config["uniq_id"] = uniq_s; config["uniq_id"] = uniq_s;
config["obj_id"] = uniq_s;
config["def_ent_id"] = (std::string) "sensor." + uniq_s; config["def_ent_id"] = (std::string) "sensor." + uniq_s;
char name[50]; char name[50];

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.7.3-dev.19" #define EMSESP_APP_VERSION "3.7.3-dev.20"

View File

@@ -430,7 +430,6 @@ void WebCustomEntityService::publish(const bool force) {
snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(custom), entityItem.name.c_str()); snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(custom), entityItem.name.c_str());
config["uniq_id"] = uniq_s; config["uniq_id"] = uniq_s;
config["obj_id"] = uniq_s;
config["name"] = entityItem.name.c_str(); config["name"] = entityItem.name.c_str();
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE]; char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];

View File

@@ -283,7 +283,6 @@ void WebSchedulerService::publish(const bool force) {
snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(scheduler), scheduleItem.name.c_str()); snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(scheduler), scheduleItem.name.c_str());
config["uniq_id"] = uniq_s; config["uniq_id"] = uniq_s;
config["obj_id"] = uniq_s;
config["name"] = scheduleItem.name.c_str(); config["name"] = scheduleItem.name.c_str();
config["def_ent_id"] = (std::string) "switch." + uniq_s; config["def_ent_id"] = (std::string) "switch." + uniq_s;