Clarify stats refresh comment about debounced behavior

The async_request_refresh call is deliberately debounced (not
immediate) so that multiple stats entities registering during platform
setup are batched into a single API call. Update the comment to
accurately describe this.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Agner
2026-04-10 16:32:55 +02:00
parent 0c2153dc1e
commit 5ac545e7e1

View File

@@ -79,8 +79,9 @@ class HassioStatsEntity(CoordinatorEntity[HassioStatsDataUpdateCoordinator]):
)
# Stats are only fetched for containers with subscribed entities.
# The first coordinator refresh (before entities exist) has no
# subscribers, so no stats are fetched. Request a refresh now
# that this entity has registered its subscription.
# subscribers, so no stats are fetched. Schedule a debounced
# refresh so that all stats entities registering during platform
# setup are batched into a single API call.
await self.coordinator.async_request_refresh()