Simplify agent_id assignment logic

Removed redundant assignment of agent_id from options.
This commit is contained in:
TechArtDev
2026-03-07 14:23:40 +02:00
committed by GitHub
parent 5ec32e15b6
commit 02fedd4857
-5
View File
@@ -145,11 +145,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: OpenClawConfigEntry) ->
entry.data.get(CONF_AGENT_ID, DEFAULT_AGENT_ID),
)
# agent_id can come from options (user-changeable) or from initial config data
agent_id: str = entry.options.get(
CONF_AGENT_ID, entry.data.get(CONF_AGENT_ID, DEFAULT_AGENT_ID)
)
client = OpenClawApiClient(
host=entry.data[CONF_GATEWAY_HOST],
port=entry.data[CONF_GATEWAY_PORT],