mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +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];
|
char str[50];
|
||||||
if (dallas_format == Mqtt::Dallas_Format::SENSORID) {
|
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 {
|
} else {
|
||||||
snprintf_P(str, sizeof(str), PSTR("{{value_json.sensor%d.temp}}"), sensor_no);
|
snprintf_P(str, sizeof(str), PSTR("{{value_json.sensor%d.temp}}"), sensor_no);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user