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; }