1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-23 17:00:13 +01:00

casper_glow: fix missing translation for exception (#171534)

This commit is contained in:
Mike O'Driscoll
2026-05-20 09:47:01 -04:00
committed by GitHub
parent e3c31a3482
commit 4da2cd465a
2 changed files with 7 additions and 1 deletions
@@ -7,6 +7,7 @@ from homeassistant.const import CONF_ADDRESS, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from .const import DOMAIN
from .coordinator import CasperGlowConfigEntry, CasperGlowCoordinator
PLATFORMS: list[Platform] = [
@@ -24,7 +25,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: CasperGlowConfigEntry) -
ble_device = bluetooth.async_ble_device_from_address(hass, address.upper(), True)
if not ble_device:
raise ConfigEntryNotReady(
f"Could not find Casper Glow device with address {address}"
translation_domain=DOMAIN,
translation_key="device_not_found",
translation_placeholders={"address": address},
)
glow = CasperGlow(ble_device)
@@ -54,6 +54,9 @@
"exceptions": {
"communication_error": {
"message": "An error occurred while communicating with the Casper Glow: {error}"
},
"device_not_found": {
"message": "Could not find Casper Glow device with address {address}"
}
}
}