From 02fedd485705b8826421b1b5d000f8f2982dcd3e Mon Sep 17 00:00:00 2001 From: TechArtDev Date: Sat, 7 Mar 2026 14:23:40 +0200 Subject: [PATCH] Simplify agent_id assignment logic Removed redundant assignment of agent_id from options. --- custom_components/openclaw/__init__.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/custom_components/openclaw/__init__.py b/custom_components/openclaw/__init__.py index 283ea9e..b0e5d44 100644 --- a/custom_components/openclaw/__init__.py +++ b/custom_components/openclaw/__init__.py @@ -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],