mqtt-queue check also for publish-on-change analog/temperature

This commit is contained in:
MichaelDvP
2025-12-16 11:36:58 +01:00
parent fec246127f
commit 1890948924
2 changed files with 2 additions and 2 deletions

View File

@@ -600,7 +600,7 @@ bool AnalogSensor::update(uint8_t gpio, const char * org_name, double offset, do
// check to see if values have been updated // check to see if values have been updated
bool AnalogSensor::updated_values() { bool AnalogSensor::updated_values() {
if (changed_) { if (changed_ && Mqtt::publish_queued() == 0) {
changed_ = false; changed_ = false;
return true; return true;
} }

View File

@@ -370,7 +370,7 @@ bool TemperatureSensor::update(const char * id, const char * name, int16_t offse
// check to see if values have been updated // check to see if values have been updated
bool TemperatureSensor::updated_values() { bool TemperatureSensor::updated_values() {
if (changed_) { if (changed_ && Mqtt::publish_queued() == 0) {
changed_ = false; changed_ = false;
return true; return true;
} }