safeboot: don't publish sensor valies (#21193)

This commit is contained in:
s-hadinger 2024-04-15 22:20:28 +02:00 committed by GitHub
parent c1845b952b
commit 87f5fbd5fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -1021,6 +1021,7 @@ bool MqttShowSensor(bool call_show_sensor) {
GetSensorValues();
#ifndef FIRMWARE_SAFEBOOT
if (TasmotaGlobal.global_update && Settings->flag.mqtt_add_global_info) { // SetOption2 (MQTT) Add global temperature/humidity/pressure info to JSON sensor message
if ((TasmotaGlobal.humidity > 0) || !isnan(TasmotaGlobal.temperature_celsius) || (TasmotaGlobal.pressure_hpa != 0)) {
uint32_t add_comma = 0;
@ -1055,6 +1056,7 @@ bool MqttShowSensor(bool call_show_sensor) {
ResponseJsonEnd();
}
}
#endif // FIRMWARE_SAFEBOOT
bool json_data_available = (ResponseLength() - json_data_start);
MqttAppendSensorUnits();