mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 12:21:04 -04:00
Add exception translations to Broadlink (#189026)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
0bb73bad5a
commit
97c4916bc9
@@ -136,6 +136,9 @@
|
||||
},
|
||||
"unload_failed": {
|
||||
"message": "Failed to unload the device"
|
||||
},
|
||||
"update_failed": {
|
||||
"message": "Failed to update the device"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ from broadlink_async.exceptions import AuthorizationError, BroadlinkException
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||
from homeassistant.util import dt as dt_util
|
||||
|
||||
from .const import DOMAIN
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .device import BroadlinkDevice
|
||||
|
||||
@@ -96,7 +98,10 @@ class BroadlinkUpdateManager(ABC, Generic[_ApiT]): # noqa: UP046
|
||||
# will skip listener notification, so notify explicitly to
|
||||
# ensure entities flip to unavailable on this transition.
|
||||
self.coordinator.async_update_listeners()
|
||||
raise UpdateFailed(err) from err
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="update_failed",
|
||||
) from err
|
||||
|
||||
if self.available is False:
|
||||
_LOGGER.warning(
|
||||
|
||||
Reference in New Issue
Block a user