From c17b5a6178f647fca80a63c778a81a4edd1230a2 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 26 Aug 2021 11:50:15 +0200 Subject: [PATCH] Add PMS5003 delayed discovery --- tasmota/xsns_18_pms5003.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasmota/xsns_18_pms5003.ino b/tasmota/xsns_18_pms5003.ino index 604583067..b1cac1a81 100644 --- a/tasmota/xsns_18_pms5003.ino +++ b/tasmota/xsns_18_pms5003.ino @@ -48,6 +48,7 @@ struct PMS5003 { uint8_t valid = 0; uint8_t wake_mode = 1; uint8_t ready = 1; + bool discovery_triggered = false; } Pms; enum PmsCommands @@ -156,6 +157,11 @@ bool PmsReadData(void) #endif // PMS_MODEL_PMS3003 Pms.valid = 10; + if (!Pms.discovery_triggered) { + TasmotaGlobal.discovery_counter = 1; // Force discovery + Pms.discovery_triggered = true; + } + return true; }