dallas, analog HA object_id also without basename (commented out)

This commit is contained in:
MichaelDvP
2022-09-24 16:17:33 +02:00
parent 20b0c9653d
commit b646331adc
3 changed files with 7 additions and 3 deletions

View File

@@ -502,7 +502,8 @@ void DallasSensor::publish_values(const bool force) {
}
config["val_tpl"] = str;
snprintf(str, sizeof(str), "%s_temperature_sensor_%s", Mqtt::basename().c_str(), sensor.name().c_str());
// snprintf(str, sizeof(str), "%s_temperature_sensor_%s", Mqtt::basename().c_str(), sensor.name().c_str());
snprintf(str, sizeof(str), "temperature_sensor_%s", sensor.name().c_str());
config["object_id"] = str;
snprintf(str, sizeof(str), "%s", sensor.name().c_str());