Coordinator uses device.status from list response instead of fetching fresh data #6

Closed
opened 2026-05-09 05:10:10 +00:00 by Mark · 1 comment
Owner

Severity: Low (stale data risk)

File: custom_components/yeedi/coordinator.py, lines 36-37

Issue: During _async_update_data, when a device in the list response already has a status field, the coordinator uses that cached status directly and skips fetching fresh status from the API:

if device.status is not None:
    statuses[device.device_id] = device.status
    continue

The device list endpoint may return status that is stale — it could be minutes old or simply less detailed than async_get_device_status. This means the vacuum entity may show outdated battery, state, or fan speed until the device list happens to return a fresh status.

Fix: Always call async_get_device_status for each device. If that fails, fall back to the device.status from the list response as a cache.

Alternatively, document this behavior clearly so users understand that status freshness depends on the device list response.

**Severity:** Low (stale data risk) **File:** `custom_components/yeedi/coordinator.py`, lines 36-37 **Issue:** During `_async_update_data`, when a device in the list response already has a `status` field, the coordinator uses that cached status directly and skips fetching fresh status from the API: ```python if device.status is not None: statuses[device.device_id] = device.status continue ``` The device list endpoint may return status that is stale — it could be minutes old or simply less detailed than `async_get_device_status`. This means the vacuum entity may show outdated battery, state, or fan speed until the device list happens to return a fresh status. **Fix:** Always call `async_get_device_status` for each device. If that fails, fall back to the `device.status` from the list response as a cache. Alternatively, document this behavior clearly so users understand that status freshness depends on the device list response.
Author
Owner

Fixed in commit. Closing.

Fixed in commit. Closing.
Mark closed this issue 2026-05-12 01:47:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/yeedi_awmbuild#6
No description provided.