home-assistant/core · error · ValueError
Updates not supported
Error message
Updates not supported
What it means
Raised by ApplicationCredentialsStorageCollection._update_data whenever an update of a stored application credential is attempted. The application credentials storage collection deliberately implements an immutable item model: items are created and deleted but never updated, because the suggested id is derived from domain + client_id and mutating either would break linkage to config entries using auth_implementation.
Source
Thrown at homeassistant/components/application_credentials/__init__.py:108
"""Validate the config is valid."""
result = self.CREATE_SCHEMA(data)
domain = result[CONF_DOMAIN]
if not await _get_platform(self.hass, domain):
raise ValueError(f"No application_credentials platform for {domain}")
return result
@callback
@override
def _get_suggested_id(self, info: dict[str, str]) -> str:
"""Suggest an ID based on the config."""
return f"{info[CONF_DOMAIN]}.{info[CONF_CLIENT_ID]}"
@override
async def _update_data(
self, item: dict[str, str], update_data: dict[str, str]
) -> dict[str, str]:
"""Return a new updated data object."""
raise ValueError("Updates not supported")
@override
async def async_delete_item(self, item_id: str) -> None:
"""Delete item, verifying credential is not in use."""
if item_id not in self.data:
raise collection.ItemNotFound(item_id)
# Cannot delete a credential currently in use by a ConfigEntry
current = self.data[item_id]
entries = self.hass.config_entries.async_entries(current[CONF_DOMAIN])
for entry in entries:
if entry.data.get("auth_implementation") == item_id:
raise HomeAssistantError(
f"Cannot delete credential in use by integration {entry.domain}"
)
await super().async_delete_item(item_id)
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Delete the existing credential (application_credentials/delete) and create a new one with the updated client_id/secret, rather than updating it.
- If the credential is referenced by a config entry (auth_implementation), remove or reconfigure that config entry first so the delete is not blocked by error 242.
- Update your websocket/API client code to never send application_credentials/update — it is not a supported operation.
Example fix
# before
await collection.async_update_item(item_id, {"client_id": new_id, "client_secret": new_secret})
# after
await collection.async_delete_item(item_id)
await collection.async_create_item({"domain": domain, "client_id": new_id, "client_secret": new_secret}) Defensive patterns
Strategy: fallback
Try / catch
try:
await collection.async_update_item(item_id, changes)
except ValueError as err:
if "Updates not supported" in str(err):
await collection.async_delete_item(item_id)
await collection.async_create_item({**base_data, **changes}) Prevention
- Never call update on the application_credentials collection; it is create/delete only.
- When rotating client secrets, script delete-then-create as a single routine.
- Check for config entries referencing the credential before deleting (see error 242).
When it happens
Trigger: Any call that ends up in collection update flow for application credentials, e.g. a websocket application_credentials/update message or hass.services/collection API that routes to _update_data on the application_credentials storage collection.
Common situations: Scripts or custom frontends that try to rotate an OAuth client_id/client_secret in place; migrating an integration to a new OAuth app by editing the existing credential instead of deleting and recreating it.
Related errors
- No application_credentials platform for {domain}
- Cannot delete credential in use by integration {entry.domain
- Credential is already linked to a user
- Unable to deactivate the owner
- System generated users cannot enable multi-factor auth modul
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/2572c55a7aa97397.
Report an issue: GitHub.