diff --git a/homeassistant/components/sfr_box/__init__.py b/homeassistant/components/sfr_box/__init__.py index f5efe82379f..b9e97175ed5 100644 --- a/homeassistant/components/sfr_box/__init__.py +++ b/homeassistant/components/sfr_box/__init__.py @@ -81,4 +81,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: SFRConfigEntry) -> bool: async def async_unload_entry(hass: HomeAssistant, entry: SFRConfigEntry) -> bool: """Unload a config entry.""" + if entry.data.get(CONF_USERNAME) and entry.data.get(CONF_PASSWORD): + return await hass.config_entries.async_unload_platforms( + entry, PLATFORMS_WITH_AUTH + ) return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)