home-assistant/core · error · ConfigEntryNotReady
consent_required
consent_required
Error message
The terms and conditions for your Anglian Water account have been updated. Please visit and log in to your Anglian Water account to accept the new terms and conditions.
What it means
Raised as ConfigEntryNotReady (translation consent_required) during setup when the Anglian Water OAuth refresh call fails with ConsentRequiredError: the account holder must re-accept updated terms and conditions on the Anglian Water portal before API access is granted. A repair issue (consent_required) is also created for the account. Setup retries every backoff cycle but will keep failing until consent is given.
Source
Thrown at homeassistant/components/anglian_water/__init__.py:52
async def async_setup_entry(
hass: HomeAssistant, entry: AnglianWaterConfigEntry
) -> bool:
"""Set up Anglian Water from a config entry."""
auth = MSOB2CAuth(
username=entry.data[CONF_USERNAME],
password=entry.data[CONF_PASSWORD],
session=async_create_clientsession(
hass,
cookie_jar=CookieJar(quote_cookie=False),
),
refresh_token=entry.data[CONF_ACCESS_TOKEN],
)
try:
await auth.send_refresh_request()
except ConsentRequiredError as err:
async_create_consent_required_issue(hass, entry.data[CONF_ACCOUNT_NUMBER])
raise ConfigEntryNotReady(
translation_domain=DOMAIN,
translation_key="consent_required",
) from err
except (ExpiredAccessTokenError, InvalidGrantError, SelfAssertedError) as err:
raise ConfigEntryAuthFailed(
translation_domain=DOMAIN,
translation_key="auth_expired",
) from err
_aw = AnglianWater(authenticator=auth)
try:
await _aw.validate_smart_meter(entry.data[CONF_ACCOUNT_NUMBER])
except SmartMeterUnavailableError as err:
raise ConfigEntryError(
translation_domain=DOMAIN, translation_key="smart_meter_unavailable"
) from err
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Log in to the Anglian Water website or app with the integration's account and accept the new terms and conditions.
- Return to HA and reload the integration (or wait for the scheduled retry) — it will then proceed.
- Do not delete the entry; the token remains valid once consent is accepted.
Defensive patterns
Strategy: fallback
Try / catch
except ConfigEntryNotReady: no code fallback — the fix is external (accept T&Cs); the created repair issue is the actionable signal.
Prevention
- Watch for the consent_required repair issue and act on it promptly.
- Keep portal credentials handy; T&Cs reappear periodically.
When it happens
Trigger: auth.send_refresh_request() with a valid refresh token where the API responds that consent is required — i.e. Anglian Water updated their T&Cs and the account has not accepted them.
Common situations: Anglian Water rolling out new terms; happens to all accounts until each user logs into the portal/portal app and accepts. Users often misread it as an auth failure and re-enter credentials needlessly.
Related errors
- consent_required
- auth_expired
- auth_expired
- User is not active
- System generated users cannot have refresh tokens connected
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/f36bdf0a9537b86a.
Report an issue: GitHub.