fix sensorid dallas format for HA

This commit is contained in:
proddy
2021-03-06 16:12:40 +01:00
parent acd678d30c
commit ac524bf7e8

View File

@@ -361,7 +361,7 @@ void DallasSensor::publish_values(const bool force) {
char str[50];
if (dallas_format == Mqtt::Dallas_Format::SENSORID) {
snprintf_P(str, sizeof(str), PSTR("{{value_json.%s}}"), sensor.to_string().c_str());
snprintf_P(str, sizeof(str), PSTR("{{value_json['%s']}}"), sensor.to_string().c_str());
} else {
snprintf_P(str, sizeof(str), PSTR("{{value_json.sensor%d.temp}}"), sensor_no);
}