home-assistant-best-practices
Best practices for Home Assistant automations, helpers, scripts, and device controls. TRIGGER THIS SKILL WHEN: - Creating or editing HA automations, scripts, or scenes - Writing automation conditions or triggers - Creating template sensors or binary sensors - Using wait_template or wait_for_trigger - Choosing between device triggers and state triggers - Selecting automation modes (single/restart/queued/parallel) - Setting up Zigbee button/remote automations (ZHA or Zigbee2MQTT) - Deciding whether to use a built-in helper vs template sensor SYMPTOMS THAT TRIGGER THIS SKILL: - Agent defaults to Jinja2 templates where native constructs exist - Agent creates template sensors for simple aggregation (sum/min/max/mean) - Agent uses template conditions instead of native state/numeric_state conditions - Agent uses wait_template instead of wait_for_trigger - Agent uses device_id instead of entity_id in triggers/actions - Agent chooses wrong automation mode (e.g., single for motion lights)