automations_validate_best_practices
Validate Home Assistant automation YAML against best practices. Checks for missing mode, deprecated service keys, and state triggers without 'for' to prevent automations from bouncing.
Instructions
Validate automation YAML against HA best practices (static linter).
Accepts a single automation dict or a list of automation dicts.
Checks:
state trigger without 'for:' (bounce risk)
missing 'mode:' declaration
multiple triggers without 'id:' fields
missing 'alias:' / 'id:'
deprecated 'service:' key in actions (use 'action:' in HA 2024.8+)
'restart' mode caution
missing 'description:'
Returns: {valid_yaml, automations_checked, issues_total, warnings, infos, issues[], summary} Each issue: {automation, rule, severity, message} severity: 'warning' = should fix, 'info' = good to know.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| yaml_content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||