Make eager_start default to True for config entry async_create_task (#115047)

pull/115059/head
J. Nick Koston 2024-04-06 11:22:02 -10:00 committed by GitHub
parent 2290362dfb
commit 29bc67234e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -1163,7 +1163,7 @@ class CoordinatorWeatherEntity(
assert coordinator.config_entry is not None
getattr(self, f"_handle_{forecast_type}_forecast_coordinator_update")()
coordinator.config_entry.async_create_task(
self.hass, self.async_update_listeners((forecast_type,))
self.hass, self.async_update_listeners((forecast_type,)), eager_start=False
)
@callback
@ -1273,5 +1273,5 @@ class SingleCoordinatorWeatherEntity(
super()._handle_coordinator_update()
assert self.coordinator.config_entry
self.coordinator.config_entry.async_create_task(
self.hass, self.async_update_listeners(None)
self.hass, self.async_update_listeners(None), eager_start=False
)

View File

@ -1056,7 +1056,7 @@ class ConfigEntry:
hass: HomeAssistant,
target: Coroutine[Any, Any, _R],
name: str | None = None,
eager_start: bool = False,
eager_start: bool = True,
) -> asyncio.Task[_R]:
"""Create a task from within the event loop.