Apply late review comments from #89396 in Nextcloud (#90327)

This commit is contained in:
Michael 2023-03-27 00:10:57 +02:00 committed by GitHub
parent 16028dc9bc
commit 00ce757051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -780,7 +780,6 @@ omit =
homeassistant/components/nexia/switch.py
homeassistant/components/nextcloud/__init__.py
homeassistant/components/nextcloud/binary_sensor.py
homeassistant/components/nextcloud/const.py
homeassistant/components/nextcloud/coordinator.py
homeassistant/components/nextcloud/entity.py
homeassistant/components/nextcloud/sensor.py

View File

@ -94,3 +94,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload Nextcloud integration."""
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
hass.data[DOMAIN].pop(entry.entry_id)
if not hass.data[DOMAIN]:
hass.data.pop(DOMAIN)
return unload_ok