← ClaudeAtlas

ha-analyze-patternslisted

Analyze Home Assistant history data and entity patterns to identify automation opportunities, unused devices, and energy anomalies. Use periodically or when looking for optimization opportunities.
gtapps/claude-code-hermit · ★ 59 · AI & Automation · score 84
Install: claude install-skill gtapps/claude-code-hermit
# HA Pattern Analysis ## Steps 1. **Load existing analysis**: Read `.claude-code-hermit/raw/snapshot-ha-pattern-analysis-latest.json` if it exists. 2. **Get live context**: Call `GetLiveContext` and `GetDateTime` via MCP for current state. 3. **Fetch history**: Run `${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha fetch-history --window-days 7`. On non-zero exit, log a single line to SHELL.md `## Monitoring` (`history fetch failed: <stderr first line>`) and continue — the skill proceeds using Phase 1 silence findings only. Do not surface the fetch failure to scheduled-check stdout. 4. **Read normalized inventory**: Read `.claude-code-hermit/raw/snapshot-ha-normalized-latest.json`. Extract both `entity_index` and `silence_summary` (added by every context refresh). Also read `.claude-code-hermit/raw/snapshot-ha-history-7d-latest.json` if present. 5. **Analyze patterns from silence_summary and history**: From `silence_summary.dead_automations` (enabled automations not fired in 30+ days): - Each entry is an actionable Reliability issue: `"automation.X has not fired in N days (enabled)"`. - `never_fired: true` entries get special phrasing: `"automation.X has never fired (enabled but never triggered)"`. From `silence_summary.silent_event_sensors` (motion/door/window sensors silent for 7+ days): - Each entry is an actionable Reliability issue: `"binary_sensor.X (<device_class>) — no events in N days"`. From `silence_summary.long_unavailable` (individual entities unav