mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
dev20, remove obj_id again
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.7.3-dev.19"
|
||||
#define EMSESP_APP_VERSION "3.7.3-dev.20"
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user