mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix dangling task for google (#88287)
This commit is contained in:
parent
0904848579
commit
a356f35638
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
@ -435,7 +434,7 @@ class GoogleCalendarEntity(
|
|||||||
await self.coordinator.async_request_refresh()
|
await self.coordinator.async_request_refresh()
|
||||||
self._apply_coordinator_update()
|
self._apply_coordinator_update()
|
||||||
|
|
||||||
asyncio.create_task(refresh())
|
self.hass.async_create_background_task(refresh(), "google.calendar-refresh")
|
||||||
|
|
||||||
async def async_get_events(
|
async def async_get_events(
|
||||||
self, hass: HomeAssistant, start_date: datetime, end_date: datetime
|
self, hass: HomeAssistant, start_date: datetime, end_date: datetime
|
||||||
|
Loading…
x
Reference in New Issue
Block a user