[ble_presence] Fix millis overflow in presence timeout check (#14293)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
d61e2f9c29
commit
3dcc9ab765
1 file changed
+1
-1
@@ -101,7 +101,7 @@ class BLEPresenceDevice : public binary_sensor::BinarySensorInitiallyOff,
|
||||
}
|
||||
|
||||
void loop() override {
|
||||
if (this->found_ && this->last_seen_ + this->timeout_ < millis())
|
||||
if (this->found_ && millis() - this->last_seen_ > this->timeout_)
|
||||
this->set_found_(false);
|
||||
}
|
||||
void dump_config() override;
|
||||
|
||||
Reference in new issue
Block a user