mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Ensure Schlage exceptions are translated (#131733)
This commit is contained in:
parent
28cfa37248
commit
954ac0d288
@ -56,7 +56,9 @@ class SchlageDataUpdateCoordinator(DataUpdateCoordinator[SchlageData]):
|
|||||||
except NotAuthorizedError as ex:
|
except NotAuthorizedError as ex:
|
||||||
raise ConfigEntryAuthFailed from ex
|
raise ConfigEntryAuthFailed from ex
|
||||||
except SchlageError as 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(
|
lock_data = await asyncio.gather(
|
||||||
*(
|
*(
|
||||||
self.hass.async_add_executor_job(self._get_lock_data, lock)
|
self.hass.async_add_executor_job(self._get_lock_data, lock)
|
||||||
|
@ -53,5 +53,10 @@
|
|||||||
"name": "1-Touch Locking"
|
"name": "1-Touch Locking"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"exceptions": {
|
||||||
|
"schlage_refresh_failed": {
|
||||||
|
"message": "Failed to refresh Schlage data"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user