mirror of
https://github.com/home-assistant/core.git
synced 2026-04-21 01:35:59 +00:00
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:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user