home-assistant/core · error · ConfigEntryAuthFailed
ConfigEntryAuthFailed
Error message
ConfigEntryAuthFailed
What it means
ConfigEntryAuthFailed is raised by the bosch_shc integration when constructing the SHCSession ( Bosch Smart Home Controller session) in an executor job raises SHCAuthenticationError — the controller rejected the client certificate/key pair or the pairing is not valid. HA stops retrying and requires the user to re-establish credentials (re-perform pairing) via the reauth flow.
Source
Thrown at homeassistant/components/bosch_shc/__init__.py:46
type BoschConfigEntry = ConfigEntry[SHCSession]
async def async_setup_entry(hass: HomeAssistant, entry: BoschConfigEntry) -> bool:
"""Set up Bosch SHC from a config entry."""
data = entry.data
zeroconf = await async_get_instance(hass)
try:
session = await hass.async_add_executor_job(
SHCSession,
data[CONF_HOST],
data[CONF_SSL_CERTIFICATE],
data[CONF_SSL_KEY],
False,
zeroconf,
)
except SHCAuthenticationError as err:
raise ConfigEntryAuthFailed from err
except SHCConnectionError as err:
raise ConfigEntryNotReady from err
shc_info = session.information
if TYPE_CHECKING:
assert shc_info is not None and shc_info.unique_id is not None
if shc_info.updateState.name == "UPDATE_AVAILABLE":
_LOGGER.warning("Please check for software updates in the Bosch Smart Home App")
entry.runtime_data = session
device_registry = dr.async_get(hass)
device_registry.async_get_or_create(
config_entry_id=entry.entry_id,
connections={(dr.CONNECTION_NETWORK_MAC, shc_info.unique_id)},
identifiers={(DOMAIN, shc_info.unique_id)},
manufacturer="Bosch",
name=entry.title,View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Confirm the host in the entry is the intended Smart Home Controller (not a second controller or changed IP).
- Re-run the integration's pairing/reauth flow to generate and register a fresh client certificate for this controller.
- Verify the SSL cert/key referenced by the entry exist and match each other (`openssl x509 -noout -modulus` vs key).
- After a controller factory reset, all old pairings are gone — re-pair every client including HA.
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def cert_pair_plausible(cert_path: str, key_path: str) -> bool:
"""Cheap pre-check that the pairing files exist and match."""
cert, key = Path(cert_path), Path(key_path)
if not (cert.is_file() and key.is_file()):
return False
import subprocess
out = subprocess.run(
["openssl", "x509", "-in", str(cert), "-noout", "-modulus"],
capture_output=True,
)
return out.returncode == 0 Try / catch
try:
session = await hass.async_add_executor_job(SHCSession, host, cert, key, False, zeroconf)
except SHCAuthenticationError as err:
raise ConfigEntryAuthFailed from err
except SHCConnectionError as err:
raise ConfigEntryNotReady from err Prevention
- Re-pair HA immediately after any SHC factory reset — old certificates are invalidated.
- Keep one cert/key pair per controller and label the files; never mix controllers.
- Confirm the host points at the intended SHC before assuming the certificate is bad.
When it happens
Trigger: `SHCSession(data[CONF_HOST], data[CONF_SSL_CERTIFICATE], data[CONF_SSL_KEY], False, zeroconf)` fails because the SSL client certificate cannot authenticate against the SHC's TLS endpoint: expired/mismatched cert-key pair, certificate from a different controller, or the pairing was removed on the controller.
Common situations: Controller factory reset wiping pairings, certificate files replaced with ones from another SHC, expired self-signed cert, wrong host pointing at a different SHC unit, certificate/key paths in the entry pointing to missing files after HA restore.
Related errors
- {address}: Authentication failed, try reconfiguring device:
- Credential is already linked to a user
- Unable to deactivate the owner
- System generated users cannot enable multi-factor auth modul
- Authentication failed, please reauthenticate.
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/831a50575530113f.
Report an issue: GitHub.