Commit 40c7255
* chore: bump skills-vendor to cf2b714 (HA 2026.5 best-practices)
Brings in:
- 'Purpose-Specific Triggers (2026.2+)' section in automation-patterns.md
(door/window/motion/temperature triggers backed by standard state/numeric_state)
- HA 2024+ plural-keyword form (triggers:/actions:/conditions:) across YAML examples
- 2026.4+ template helpers documented (entity_name, state_attr_translated)
- New yaml-only-integrations.md reference
- Continue-on-Error, Repeat Actions, Disabling Automations sections
Refs #1157.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(automations): teach native `for:` field in ha_config_set_automation
Two changes to the ha_config_set_automation docstring:
1. Add a 'for:' bullet to the PREFER NATIVE SOLUTIONS list, pointing at
the native for: field on state/numeric_state triggers and conditions
as the replacement for {{ now() - X.last_changed > timedelta(...) }}
duration math. Notes that HA 2026.5 expanded for: to purpose-specific
triggers (motion, occupancy, doors, windows).
2. Modernize the Motion Light example. The previous example taught the
stale turn_on + delay + turn_off pattern with mode: restart. Replace
with a two-trigger + choose pattern using motion-on / motion-off (with
for: 5 minutes) and native trigger-id conditions — no templates, no
action-delay, mode: single suffices because for: handles re-trigger
semantics.
Refs #1157. Complements the best-practice detector in #1264.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(eval_template): remove automation-logic template examples
ha_eval_template's docstring was teaching the exact anti-patterns the
best-practice checker now flags. The 'Automation Conditions' use-case
block showed `{{ is_state(...) and now().hour >= 7 }}` as the example
of how to do conditions, and 'Test complex automation condition' wrote
out the same shape combined with a `| float > 20` numeric comparison.
Both teach agents that template logic is how you build automation
conditions; the project actively steers the opposite direction.
Replace with:
- A 'When NOT to use this for automation/script logic' callout listing
the native alternatives (numeric_state, state, time, sun, for:) and
pointing at ha_get_skill_guide for the full list.
- Reframe remaining examples so they're shown as legitimate template
positions (notification bodies, dynamic data.* values, debugging
existing templates) rather than as logic-building examples.
Refs #1157.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci(renovate): enable git-submodules manager for skills-vendor
The skills bundle (`src/ha_mcp/resources/skills-vendor`) is a git
submodule. Submodules are pinned by design, and the workflows checkout
with `submodules: true` — meaning each release ships exactly the SHA
pinned at build time. Without auto-update infra, the pinned SHA drifts
silently behind upstream until someone manually bumps it; that
'silently' is the failure mode that led to this PR (helper-selection.md
served at runtime was missing the `filter`, `random`,
`generic_thermostat`, `generic_hygrostat`, and `switch_as_x`
helpers — all real types the `ha_config_set_helper` tool advertises).
Enable Renovate's `git-submodules` manager so the submodule pointer
gets opened as a reviewable PR whenever upstream main advances. The
existing global Tuesday-3pm-UTC schedule applies. `.gitmodules` needs
`branch = main` for Renovate to know which upstream ref to track —
without it, Renovate defaults to `master`, which doesn't exist on
`homeassistant-ai/skills`.
The next time `homeassistant-ai/skills` lands a commit on `main`,
Renovate will open a bump PR; merging it ships the new skill content in
the next `publish-dev`/release cycle.
Refs #1157.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: address review — drop unverified version claim, fix Motion Light logic hole
Three fixes from the contrib + Gemini review on this branch:
1. Drop the parenthetical claim that 'HA 2026.5 expanded for: to
purpose-specific triggers'. The claim conflates two distinct things:
for: on state/numeric_state has existed for years; the purpose-
specific triggers (introduced 2025.12 / labelled 2026.2+ in the
vendored skill) are a UI editor abstraction over the same YAML and
are still a Labs preview behind an opt-in flag. The bullet's main
point — use native for: instead of last_changed/last_updated math —
stands on its own.
2. Motion Light example: top-level 'condition: sun, after: sunset'
gated both the motion_on and motion_off branches of the choose. If
the sun rose during the 5-minute for: window, motion_off fired but
the top-level condition was false, leaving the light on. Move the
sun condition into the motion_on branch only (matches Gemini's
suggestion). Rephrase the example header to describe the actual
change ('for: on the off-transition replaces action-delay') instead
of overclaiming 'no template' (the previous example was also
template-free).
3. ha_eval_template docstring: the Conditional Logic block showed
'{% if is_state('sun.sun', 'above_horizon') %}' as a Jinja2 syntax
example — but the new 'When NOT to use' callout explicitly tells
agents not to write 'is_state('sun.sun', ...)' in condition
positions. Swap the example subject to alarm_control_panel state
(no native equivalent for the notification-string use case it
illustrates) and tighten the section heading to 'Conditional Logic
(for display strings — not for condition: positions)'. Also add a
'choose action over templated service: / action: strings' bullet to
the callout — the lead-in mentioned action service names but no
bullet covered them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e0e59ee commit 40c7255
5 files changed
Lines changed: 42 additions & 30 deletions
File tree
- src/ha_mcp
- resources
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
Submodule skills-vendor updated 18 files
- .claude-plugin/marketplace.json+2-2
- .claude-plugin/plugin.json+1-1
- .github/pull_request_template.md+8
- .github/workflows/auto-bump-version.yml+22-5
- CLAUDE.md+10-4
- CONTRIBUTING.md+2-1
- README.md+10-4
- skills/home-assistant-best-practices/SKILL.md+16-7
- skills/home-assistant-best-practices/evals/evals.json+48
- skills/home-assistant-best-practices/references/automation-patterns.md+245-27
- skills/home-assistant-best-practices/references/dashboard-cards.md+4-3
- skills/home-assistant-best-practices/references/dashboard-guide.md+20-3
- skills/home-assistant-best-practices/references/device-control.md+55-33
- skills/home-assistant-best-practices/references/examples.yaml+12-12
- skills/home-assistant-best-practices/references/helper-selection.md+265-13
- skills/home-assistant-best-practices/references/safe-refactoring.md+72
- skills/home-assistant-best-practices/references/template-guidelines.md+16-14
- skills/home-assistant-best-practices/references/yaml-only-integrations.md+21
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
460 | 462 | | |
461 | 463 | | |
462 | 464 | | |
| |||
518 | 520 | | |
519 | 521 | | |
520 | 522 | | |
521 | | - | |
| 523 | + | |
522 | 524 | | |
523 | 525 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
532 | 542 | | |
533 | 543 | | |
534 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
| 1029 | + | |
1030 | 1030 | | |
1031 | 1031 | | |
1032 | | - | |
1033 | | - | |
| 1032 | + | |
| 1033 | + | |
1034 | 1034 | | |
1035 | | - | |
| 1035 | + | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1072 | 1077 | | |
1073 | 1078 | | |
1074 | 1079 | | |
| |||
1086 | 1091 | | |
1087 | 1092 | | |
1088 | 1093 | | |
1089 | | - | |
| 1094 | + | |
1090 | 1095 | | |
1091 | 1096 | | |
1092 | 1097 | | |
| |||
1096 | 1101 | | |
1097 | 1102 | | |
1098 | 1103 | | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| |||
0 commit comments