mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fix sensorid dallas format for HA
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user