Skip to content

[Bug] Cover open_cover / set_cover_position raises RuntimeError code=2 (motor-control) but motor still executes #1773

Description

@eric2100

Environment

  • HA version: 2026.8.1
  • Integration version: Xiaomi Home v0.4.7
  • Device: 米家智能窗簾 (Mi Smart Curtain), model 090615.curtain.sidt82, 2 units

Symptom

Calling cover.open_cover or cover.set_cover_position on the curtain entities raises:

RuntimeError('执行错误, 未知错误, code=2, cover.090615_cn_510065454_sidt82_s_2_curtain, 窗帘, motor-control')

...but the curtain physically moves (the motor executes the command). cover.close_cover works without error.

Impact

Any automation/script that calls open/set_position aborts at that step (default continue_on_error: false), so all subsequent actions are skipped. Workaround: add continue_on_error: true to those actions.

Reproduction

  1. Call cover.open_cover on the entity (service call / REST / python_script)
  2. Exception is raised, but the curtain still opens
  3. cover.close_cover returns OK

Expected behavior

No exception — the command succeeded physically. At minimum it should be a warning, not an error that aborts scripts.

Notes

  • Both curtains affected (same model, different devices)
  • code=2 with motor-control suggests the API returns an error even though the command was executed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions