HA obj_id/default_entity_id fix - #2640

This commit is contained in:
proddy
2025-10-08 21:38:56 +02:00
parent 0fe0ee77b3
commit ee4f58ce20
6 changed files with 38 additions and 30 deletions

View File

@@ -531,8 +531,8 @@ void TemperatureSensor::publish_values(const bool force) {
snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(temperaturesensor), sensor.id().c_str());
}
config["obj_id"] = uniq_s;
config["uniq_id"] = uniq_s; // same as object_id/obj_id
config["uniq_id"] = uniq_s;
config["default_entity_id"] = (std::string) "sensor." + uniq_s;
char name[50];
snprintf(name, sizeof(name), "%s", sensor.name().c_str());