mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-17 21:29:52 +03:00
mqtt-queue check also for publish-on-change analog/temperature
This commit is contained in:
@@ -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
|
||||
bool AnalogSensor::updated_values() {
|
||||
if (changed_) {
|
||||
if (changed_ && Mqtt::publish_queued() == 0) {
|
||||
changed_ = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ bool TemperatureSensor::update(const char * id, const char * name, int16_t offse
|
||||
|
||||
// check to see if values have been updated
|
||||
bool TemperatureSensor::updated_values() {
|
||||
if (changed_) {
|
||||
if (changed_ && Mqtt::publish_queued() == 0) {
|
||||
changed_ = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user