add HA dev section linking all devices to ems-esp

This commit is contained in:
proddy
2025-12-13 11:21:45 +01:00
parent c2e8a6c73d
commit ecbdf01bdf
5 changed files with 6 additions and 6 deletions

View File

@@ -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<JsonObject>(), "Temperature Sensors", nullptr, nullptr, nullptr, false);
Mqtt::add_ha_dev_section(config.as<JsonObject>(), "Temperature Sensors", nullptr, "EMS-ESP", EMSESP_APP_VERSION, true);
}
Mqtt::add_ha_avty_section(config.as<JsonObject>(), stat_t, val_cond);