diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c1099e..85be3fb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Sensor magnitude decimals / precision setting ([#2550](https://github.com/xoseperez/espurna/issues/2550), [8f1c44fe](https://github.com/xoseperez/espurna/commit/8f1c44fe69383e548cc94a50cccaae71f4ffe056)) - Fix DNS requests handling with no servers configured or when they are unavailable ([175c04ac](https://github.com/xoseperez/espurna/commit/175c04acc1afeacdd17f7a7721ebaa21ce5ef347)) - GPIO lock result stored with the request in the log; show WebUI notification when failures occur ([3a1e041f](https://github.com/xoseperez/espurna/commit/3a1e041f5166d4ae459f3ab1853996b2606ee01a)) +- Fix thermostat remote sensor payload parser using incorrect keys ([#2585](https://github.com/xoseperez/espurna/issues/2585)) ## [1.15.0-dev] Snapshot build 2023-01-12 diff --git a/code/espurna/thermostat.cpp b/code/espurna/thermostat.cpp index 679d1d52..2ecd1cc9 100644 --- a/code/espurna/thermostat.cpp +++ b/code/espurna/thermostat.cpp @@ -200,8 +200,9 @@ void thermostatMqttCallback(unsigned int type, espurna::StringView topic, espurn // Check remote sensor temperature if (topic == thermostat_remote_sensor_topic) { - if (root.containsKey(magnitudeTopic(MAGNITUDE_TEMPERATURE))) { - String remote_temp = root[magnitudeTopic(MAGNITUDE_TEMPERATURE)]; + const auto key = magnitudeTypeTopic(MAGNITUDE_TEMPERATURE); + if (root.containsKey(key)) { + String remote_temp = root[key]; _remote_temp.temp = remote_temp.toFloat(); _remote_temp.last_update = millis(); _remote_temp.need_display_update = true;