mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Ensure Schlage exceptions are translated (#131733)
This commit is contained in:
@@ -56,7 +56,9 @@ class SchlageDataUpdateCoordinator(DataUpdateCoordinator[SchlageData]):
|
||||
except NotAuthorizedError as ex:
|
||||
raise ConfigEntryAuthFailed from ex
|
||||
except SchlageError as ex:
|
||||
raise UpdateFailed("Failed to refresh Schlage data") from ex
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN, translation_key="schlage_refresh_failed"
|
||||
) from ex
|
||||
lock_data = await asyncio.gather(
|
||||
*(
|
||||
self.hass.async_add_executor_job(self._get_lock_data, lock)
|
||||
|
@@ -53,5 +53,10 @@
|
||||
"name": "1-Touch Locking"
|
||||
}
|
||||
}
|
||||
},
|
||||
"exceptions": {
|
||||
"schlage_refresh_failed": {
|
||||
"message": "Failed to refresh Schlage data"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user