Ensure Schlage exceptions are translated (#131733)
parent
28cfa37248
commit
954ac0d288
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue