mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add mqtt base to topic - #759
This commit is contained in:
@@ -451,8 +451,7 @@ 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), "analog_sensor_%d", sensor.gpio());
|
||||
snprintf(str, sizeof(str), "%s_analog_sensor_%s", Mqtt::basename().c_str(), sensor.name().c_str());
|
||||
config["object_id"] = str;
|
||||
config["uniq_id"] = str; // same as object_id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user