Skip to content

Commit 999acc4

Browse files
authored
Log HomeAssistantErrors in ZHA config flow (home-assistant#156075)
1 parent 5dcf3d8 commit 999acc4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

homeassistant/components/zha/config_flow.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from contextlib import suppress
99
from enum import StrEnum
1010
import json
11+
import logging
1112
import os
1213
from typing import Any
1314

@@ -57,6 +58,8 @@
5758
ZhaRadioManager,
5859
)
5960

61+
_LOGGER = logging.getLogger(__name__)
62+
6063
CONF_MANUAL_PATH = "Enter Manually"
6164
DECONZ_DOMAIN = "deconz"
6265

@@ -527,6 +530,7 @@ async def async_step_maybe_reset_old_radio(
527530
try:
528531
await self._reset_old_radio_task
529532
except HomeAssistantError:
533+
_LOGGER.exception("Failed to reset old radio during migration")
530534
# Old adapter not found or cannot connect, show prompt to plug back in
531535
return self.async_show_progress_done(next_step_id="plug_in_old_radio")
532536
finally:
@@ -785,6 +789,7 @@ async def async_step_restore_backup(
785789
next_step_id="pre_confirm_ezsp_ieee_overwrite"
786790
)
787791
except HomeAssistantError:
792+
_LOGGER.exception("Failed to restore network backup to new radio")
788793
# User unplugged the new adapter, allow retry
789794
return self.async_show_progress_done(next_step_id="pre_plug_in_new_radio")
790795
except CannotWriteNetworkSettings as exc:

0 commit comments

Comments
 (0)