Mute superfluous exception when no Netatmo webhook is to be dropped (#81221)
* Mute superfluous exception when no webhook is to be droped * Update homeassistant/components/netatmo/__init__.py Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
b043406b74
commit
f10b36873a
1 changed files with 4 additions and 1 deletions
|
@ -271,7 +271,10 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
|
||||
if CONF_WEBHOOK_ID in entry.data:
|
||||
webhook_unregister(hass, entry.data[CONF_WEBHOOK_ID])
|
||||
try:
|
||||
await data[entry.entry_id][AUTH].async_dropwebhook()
|
||||
except pyatmo.ApiError:
|
||||
_LOGGER.debug("No webhook to be dropped")
|
||||
_LOGGER.info("Unregister Netatmo webhook")
|
||||
|
||||
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||
|
|
Loading…
Add table
Reference in a new issue