Skip to content

Bug: select.openclaw_assistant_active_model resets every ~15s, ignoring agent_id from integration settings #24

@Slaventuss

Description

@Slaventuss

Bug: select.openclaw_assistant_active_model resets every ~15s, ignoring agent_id from integration settings

Summary

The select.openclaw_assistant_active_model entity continuously resets to the gateway's default agent, ignoring the Agent ID and Voice agent ID configured in the integration settings. This makes the select entity effectively broken for anyone using a non-default agent.

Environment

  • OpenClaw version: 2026.4.2
  • HA integration version: latest
  • Multiple agents configured: main, voice, health, exfeeter

Steps to reproduce

  1. Configure the integration with Agent ID: voice and Voice agent ID: voice (a non-default agent)
  2. In HA, open the OpenClaw card and observe select.openclaw_assistant_active_model
  3. Manually select openclaw/voice in the dropdown
  4. Wait 10–15 seconds without doing anything — no conversation, no automation, nothing
  5. Observe: the select resets to openclaw on its own

Expected behavior

The select entity should reflect the agent configured in the integration settings (agent_id). If agent_id: voice is set, the initial value and the "reset" value after a request should be openclaw/voice, not openclaw.

Actual behavior

The integration polls the gateway's current default agent every ~10–15 seconds and overwrites the select with whatever the gateway reports as its global default — regardless of what's configured in the integration. The Activity Log shows a constant spam:

OpenClaw Assistant Active Model changed to openclaw
OpenClaw Assistant Active Model changed to openclaw/voice  ← triggered by automation workaround
OpenClaw Assistant Active Model changed to openclaw
...

Root cause (suspected)

The select entity is initialized and periodically synced from the gateway's global default, not from the agent_id field in the integration config entry. The gateway always returns its own default agent in the sync response, which overwrites any manual selection.

Proposed fix

On initialization (and after each request), the select entity should default to the agent configured in the integration's agent_id setting, not the gateway's global default. Concretely:

  • If agent_id is set in the config entry → use openclaw/<agent_id> as the default/reset value
  • Only fall back to openclaw (gateway default) if no agent_id is configured

Workaround (ugly but works)

Users currently have to add a select.select_option action at the start of every automation that uses the agent, to re-select the correct agent before each conversation.process call. This pollutes the Activity Log and is fragile.

Additional context

The select UI element clearly exists to let users choose which agent handles requests. When agent_id is explicitly configured in the integration settings, the select should respect that configuration rather than fighting against it every 15 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions