278 files

This commit is contained in:
Home Assistant Version Control
2026-09-13 20:38:58 +00:00
parent d7a0a08372
commit 1b4f5f68c6
278 changed files with 36892 additions and 7150 deletions
@@ -17,7 +17,8 @@ import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.core import HomeAssistant
from ..const import CONF_OBJECT, CONF_TASKS, DOMAIN, GLOBAL_UNIQUE_ID, MAX_ID_LENGTH, MAX_NAME_LENGTH
from ..const import CONF_OBJECT, CONF_TASKS, DOMAIN, MAX_ID_LENGTH, MAX_NAME_LENGTH
from ..helpers.aggregate import is_object_entry
from ..helpers.integration_signatures import (
SIGNATURES,
build_setup_trigger,
@@ -115,11 +116,11 @@ async def ws_adopt_integration_setups(
objects_created += 1
entry = hass.config_entries.async_get_entry(entry_id)
# Same three-part guard as websocket._load_object_entry: the global
# settings entry is NOT a valid adoption target — async_persist_task
# writes CONF_TASKS + CONF_OBJECT["task_ids"] into whatever entry it
# is handed, so a client-supplied global entry_id would corrupt it.
if entry is None or entry.domain != DOMAIN or entry.unique_id == GLOBAL_UNIQUE_ID:
# Same guard as websocket._load_object_entry: the global settings
# entry is NOT a valid adoption target — async_persist_task writes
# CONF_TASKS + CONF_OBJECT["task_ids"] into whatever entry it is
# handed, so a client-supplied global entry_id would corrupt it.
if not is_object_entry(entry):
errors.append({"device_id": device_id, "reason": "target object not found"})
continue