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

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