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

@@ -282,9 +282,9 @@ void WebSchedulerService::publish(const bool force) {
char uniq_s[70];
snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(scheduler), scheduleItem.name.c_str());
config["obj_id"] = uniq_s;
config["uniq_id"] = uniq_s; // same as object_id
config["name"] = scheduleItem.name.c_str();
config["uniq_id"] = uniq_s;
config["name"] = scheduleItem.name.c_str();
config["default_entity_id"] = (std::string) "switch." + uniq_s;
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];
char command_topic[Mqtt::MQTT_TOPIC_MAX_SIZE];