AgentSkillsCN

ha-config-flow-options

Home Assistant ConfigFlow/OptionsFlow模式——单实例保护机制、模式校验、重新加载监听器,以及安全的选项处理方式,杜绝递归调用。

SKILL.md
--- frontmatter
name: ha-config-flow-options
description: Home Assistant ConfigFlow/OptionsFlow patterns—single-instance guard, schema validation, reload listeners, safe options handling without recursion.
license: Complete terms in LICENSE.txt

HA Config Flow & Options

Use when adding or fixing config/option flows.

Quick start

  • Guard single instance in async_step_user when appropriate.
  • Validate inputs (interval mins, divisor ordering) with clear errors.
  • Use standard OptionsFlow; do not override async_create_entry recursively.
  • Register update listener in setup to reload platforms on option change.

References