mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Catch exception for failed webhook drop for netatmo (#52119)
This commit is contained in:
parent
b3b23066a8
commit
5a4a1a250d
@ -131,7 +131,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
{"type": "None", "data": {WEBHOOK_PUSH_TYPE: WEBHOOK_DEACTIVATION}},
|
||||
)
|
||||
webhook_unregister(hass, entry.data[CONF_WEBHOOK_ID])
|
||||
await hass.data[DOMAIN][entry.entry_id][AUTH].async_dropwebhook()
|
||||
try:
|
||||
await hass.data[DOMAIN][entry.entry_id][AUTH].async_dropwebhook()
|
||||
except pyatmo.ApiError:
|
||||
_LOGGER.debug(
|
||||
"No webhook to be dropped for %s", entry.data[CONF_WEBHOOK_ID]
|
||||
)
|
||||
|
||||
async def register_webhook(event):
|
||||
if CONF_WEBHOOK_ID not in entry.data:
|
||||
|
Loading…
x
Reference in New Issue
Block a user