Skip to content

Commit 02fedd4

Browse files
authored
Simplify agent_id assignment logic
Removed redundant assignment of agent_id from options.
1 parent 5ec32e1 commit 02fedd4

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

custom_components/openclaw/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: OpenClawConfigEntry) ->
145145
entry.data.get(CONF_AGENT_ID, DEFAULT_AGENT_ID),
146146
)
147147

148-
# agent_id can come from options (user-changeable) or from initial config data
149-
agent_id: str = entry.options.get(
150-
CONF_AGENT_ID, entry.data.get(CONF_AGENT_ID, DEFAULT_AGENT_ID)
151-
)
152-
153148
client = OpenClawApiClient(
154149
host=entry.data[CONF_GATEWAY_HOST],
155150
port=entry.data[CONF_GATEWAY_PORT],

0 commit comments

Comments
 (0)