Fix dangling task for smart_meter_texas (#88297)

This commit is contained in:
Paulus Schoutsen 2023-02-17 14:53:49 -05:00 committed by GitHub
parent 28a09199ac
commit 4b3b2fb693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
DATA_SMART_METER: smart_meter_texas_data,
}
asyncio.create_task(coordinator.async_refresh())
entry.async_create_background_task(
hass, coordinator.async_refresh(), "smart_meter_texas-coordinator-refresh"
)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)