diff --git a/src/core/analogsensor.cpp b/src/core/analogsensor.cpp index f70e72f24..c5729d5b6 100644 --- a/src/core/analogsensor.cpp +++ b/src/core/analogsensor.cpp @@ -793,7 +793,7 @@ void AnalogSensor::publish_values(const bool force) { // see if we need to create the [devs] discovery section, as this needs only to be done once for all sensors if (std::none_of(sensors_.begin(), sensors_.end(), [](const auto & sensor) { return sensor.ha_registered; })) { - Mqtt::add_ha_dev_section(config.as(), "Analog Sensors", nullptr, nullptr, nullptr, false); + Mqtt::add_ha_dev_section(config.as(), "Analog Sensors", nullptr, "EMS-ESP", EMSESP_APP_VERSION, true); } // add default_entity_id diff --git a/src/core/shower.cpp b/src/core/shower.cpp index bb3b0f29c..0beebfd93 100644 --- a/src/core/shower.cpp +++ b/src/core/shower.cpp @@ -211,7 +211,7 @@ void Shower::create_ha_discovery() { doc["stat_t"] = "~/shower_active"; Mqtt::add_ha_bool(doc.as()); - Mqtt::add_ha_dev_section(doc.as(), "Shower Sensor", nullptr, nullptr, nullptr, false); + Mqtt::add_ha_dev_section(doc.as(), "Shower Sensors", nullptr, nullptr, nullptr, false); Mqtt::add_ha_avty_section(doc.as()); // no conditions snprintf(topic, sizeof(topic), "binary_sensor/%s/shower_active/config", Mqtt::basename().c_str()); @@ -239,7 +239,7 @@ void Shower::create_ha_discovery() { doc["dev_cla"] = "duration"; // doc["ent_cat"] = "diagnostic"; - Mqtt::add_ha_dev_section(doc.as(), "Shower Sensor", nullptr, nullptr, nullptr, false); + Mqtt::add_ha_dev_section(doc.as(), "Shower Sensors", nullptr, "EMS-ESP", EMSESP_APP_VERSION, true); Mqtt::add_ha_avty_section(doc.as(), "~/shower_data", "value_json.duration is defined"); snprintf(topic, sizeof(topic), "sensor/%s/shower_duration/config", Mqtt::basename().c_str()); diff --git a/src/core/temperaturesensor.cpp b/src/core/temperaturesensor.cpp index e50e0defc..cca9b289f 100644 --- a/src/core/temperaturesensor.cpp +++ b/src/core/temperaturesensor.cpp @@ -545,7 +545,7 @@ void TemperatureSensor::publish_values(const bool force) { // see if we need to create the [devs] discovery section, as this needs only to be done once for all sensors if (std::none_of(sensors_.begin(), sensors_.end(), [](const auto & sensor) { return sensor.ha_registered; })) { - Mqtt::add_ha_dev_section(config.as(), "Temperature Sensors", nullptr, nullptr, nullptr, false); + Mqtt::add_ha_dev_section(config.as(), "Temperature Sensors", nullptr, "EMS-ESP", EMSESP_APP_VERSION, true); } Mqtt::add_ha_avty_section(config.as(), stat_t, val_cond); diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index 807e7f3ba..22e7df99d 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -466,7 +466,7 @@ void WebCustomEntityService::publish(const bool force) { Mqtt::add_ha_classes(config.as(), EMSdevice::DeviceType::SYSTEM, entityItem.value_type, entityItem.uom); if (!ha_created) { - Mqtt::add_ha_dev_section(config.as(), "Custom Entities", nullptr, nullptr, nullptr, false); + Mqtt::add_ha_dev_section(config.as(), "Custom Entities", nullptr, "EMS-ESP", EMSESP_APP_VERSION, true); } Mqtt::add_ha_avty_section(config.as(), stat_t, val_cond); diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index 0e4c3c3b1..e732f6ea6 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -276,7 +276,7 @@ void WebSchedulerService::publish(const bool force) { Mqtt::add_ha_bool(config.as()); if (!ha_created) { - Mqtt::add_ha_dev_section(config.as(), F_(scheduler), nullptr, nullptr, nullptr, false); + Mqtt::add_ha_dev_section(config.as(), F_(scheduler), nullptr, "EMS-ESP", EMSESP_APP_VERSION, true); } Mqtt::add_ha_avty_section(config.as(), stat_t, val_cond);