mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 23:37:18 +00:00
Make eager_start default to True for config entry async_create_task (#115047)
This commit is contained in:
parent
2290362dfb
commit
29bc67234e
@ -1163,7 +1163,7 @@ class CoordinatorWeatherEntity(
|
|||||||
assert coordinator.config_entry is not None
|
assert coordinator.config_entry is not None
|
||||||
getattr(self, f"_handle_{forecast_type}_forecast_coordinator_update")()
|
getattr(self, f"_handle_{forecast_type}_forecast_coordinator_update")()
|
||||||
coordinator.config_entry.async_create_task(
|
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
|
@callback
|
||||||
@ -1273,5 +1273,5 @@ class SingleCoordinatorWeatherEntity(
|
|||||||
super()._handle_coordinator_update()
|
super()._handle_coordinator_update()
|
||||||
assert self.coordinator.config_entry
|
assert self.coordinator.config_entry
|
||||||
self.coordinator.config_entry.async_create_task(
|
self.coordinator.config_entry.async_create_task(
|
||||||
self.hass, self.async_update_listeners(None)
|
self.hass, self.async_update_listeners(None), eager_start=False
|
||||||
)
|
)
|
||||||
|
@ -1056,7 +1056,7 @@ class ConfigEntry:
|
|||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
target: Coroutine[Any, Any, _R],
|
target: Coroutine[Any, Any, _R],
|
||||||
name: str | None = None,
|
name: str | None = None,
|
||||||
eager_start: bool = False,
|
eager_start: bool = True,
|
||||||
) -> asyncio.Task[_R]:
|
) -> asyncio.Task[_R]:
|
||||||
"""Create a task from within the event loop.
|
"""Create a task from within the event loop.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user