mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 16:49:11 +03:00
ha_dev_section for custom and scheduler
This commit is contained in:
@@ -465,9 +465,7 @@ void WebCustomEntityService::publish(const bool force) {
|
||||
|
||||
Mqtt::add_ha_classes(config.as<JsonObject>(), EMSdevice::DeviceType::SYSTEM, entityItem.value_type, entityItem.uom);
|
||||
|
||||
if (!ha_created) {
|
||||
Mqtt::add_ha_dev_section(config.as<JsonObject>(), "Custom Entities", nullptr, "EMS-ESP", EMSESP_APP_VERSION, true);
|
||||
}
|
||||
Mqtt::add_ha_dev_section(config.as<JsonObject>(), "Custom Entities", nullptr, "EMS-ESP", EMSESP_APP_VERSION, !ha_created);
|
||||
Mqtt::add_ha_avty_section(config.as<JsonObject>(), stat_t, val_cond);
|
||||
|
||||
ha_created |= Mqtt::queue_ha(topic, config.as<JsonObject>());
|
||||
|
||||
@@ -276,9 +276,7 @@ void WebSchedulerService::publish(const bool force) {
|
||||
config["cmd_t"] = command_topic;
|
||||
|
||||
Mqtt::add_ha_bool(config.as<JsonObject>());
|
||||
if (!ha_created) {
|
||||
Mqtt::add_ha_dev_section(config.as<JsonObject>(), F_(scheduler), nullptr, "EMS-ESP", EMSESP_APP_VERSION, true);
|
||||
}
|
||||
Mqtt::add_ha_dev_section(config.as<JsonObject>(), F_(scheduler), nullptr, "EMS-ESP", EMSESP_APP_VERSION, !ha_created);
|
||||
Mqtt::add_ha_avty_section(config.as<JsonObject>(), stat_t, val_cond);
|
||||
|
||||
ha_created |= Mqtt::queue_ha(topic, config.as<JsonObject>());
|
||||
|
||||
Reference in New Issue
Block a user