{"record":{"id":"f36bdf0a9537b86a","repo":"home-assistant/core","slug":"consent-required","errorCode":"consent_required","errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":"ConfigEntryNotReady","httpStatus":null,"severity":"error","filePath":"homeassistant/components/anglian_water/__init__.py","lineNumber":52,"sourceCode":"\nasync def async_setup_entry(\n    hass: HomeAssistant, entry: AnglianWaterConfigEntry\n) -> bool:\n    \"\"\"Set up Anglian Water from a config entry.\"\"\"\n    auth = MSOB2CAuth(\n        username=entry.data[CONF_USERNAME],\n        password=entry.data[CONF_PASSWORD],\n        session=async_create_clientsession(\n            hass,\n            cookie_jar=CookieJar(quote_cookie=False),\n        ),\n        refresh_token=entry.data[CONF_ACCESS_TOKEN],\n    )\n    try:\n        await auth.send_refresh_request()\n    except ConsentRequiredError as err:\n        async_create_consent_required_issue(hass, entry.data[CONF_ACCOUNT_NUMBER])\n        raise ConfigEntryNotReady(\n            translation_domain=DOMAIN,\n            translation_key=\"consent_required\",\n        ) from err\n    except (ExpiredAccessTokenError, InvalidGrantError, SelfAssertedError) as err:\n        raise ConfigEntryAuthFailed(\n            translation_domain=DOMAIN,\n            translation_key=\"auth_expired\",\n        ) from err\n\n    _aw = AnglianWater(authenticator=auth)\n\n    try:\n        await _aw.validate_smart_meter(entry.data[CONF_ACCOUNT_NUMBER])\n    except SmartMeterUnavailableError as err:\n        raise ConfigEntryError(\n            translation_domain=DOMAIN, translation_key=\"smart_meter_unavailable\"\n        ) from err\n","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/anglian_water/__init__.py#L34-L70","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"except ConfigEntryNotReady: no code fallback — the fix is external (accept T&Cs); the created repair issue is the actionable signal.","preventionTips":["Watch for the consent_required repair issue and act on it promptly.","Keep portal credentials handy; T&Cs reappear periodically."],"tags":["auth","consent","water","config-entry-not-ready","repair-issue"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}