mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-22 18:26:30 +00:00
Add PMS5003 delayed discovery
This commit is contained in:
parent
454d4601b4
commit
c17b5a6178
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user