Fixing config_entries.async_forward_entry_unload calls (step 1) (#27857)
parent
c42ca94a86
commit
5ce437dc30
|
@ -19,7 +19,4 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
|||
|
||||
async def async_unload_entry(hass, entry):
|
||||
"""Unload a config entry."""
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_unload(entry, "sensor")
|
||||
)
|
||||
return True
|
||||
return await hass.config_entries.async_forward_entry_unload(entry, "sensor")
|
||||
|
|
|
@ -55,7 +55,4 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
|||
|
||||
async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
||||
"""Unload Linky sensors."""
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_unload(entry, "sensor")
|
||||
)
|
||||
return True
|
||||
return await hass.config_entries.async_forward_entry_unload(entry, "sensor")
|
||||
|
|
|
@ -127,8 +127,7 @@ async def async_unload_entry(hass, entry):
|
|||
"""Unload a config entry."""
|
||||
hass.components.webhook.async_unregister(entry.data[CONF_WEBHOOK_ID])
|
||||
hass.data[DOMAIN]["unsub_device_tracker"].pop(entry.entry_id)()
|
||||
await hass.config_entries.async_forward_entry_unload(entry, DEVICE_TRACKER)
|
||||
return True
|
||||
return await hass.config_entries.async_forward_entry_unload(entry, DEVICE_TRACKER)
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
|
|
@ -172,12 +172,9 @@ async def async_unload_entry(hass, config_entry):
|
|||
)
|
||||
remove_listener()
|
||||
|
||||
for component in ("sensor",):
|
||||
await hass.config_entries.async_forward_entry_unload(config_entry, component)
|
||||
|
||||
hass.data[DOMAIN][DATA_LUFTDATEN_CLIENT].pop(config_entry.entry_id)
|
||||
|
||||
return True
|
||||
return await hass.config_entries.async_forward_entry_unload(config_entry, "sensor")
|
||||
|
||||
|
||||
class LuftDatenData:
|
||||
|
|
|
@ -92,8 +92,4 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
|||
|
||||
async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
||||
"""Unload Withings config entry."""
|
||||
await hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_unload(entry, "sensor")
|
||||
)
|
||||
|
||||
return True
|
||||
return await hass.config_entries.async_forward_entry_unload(entry, "sensor")
|
||||
|
|
Loading…
Reference in New Issue