plugins/claude-code-homeassistant-hermit/skills/ha-presence-report/SKILL.md
Presence history & tracker-health report — current home/away state, reliability, recent arrival/departure transitions, and activity patterns for person/device_tracker entities. Use when the operator asks about presence history or when a presence-dependent automation (locks, alarm, vacuum, climate) misbehaves.
npx skillsauth add gtapps/claude-code-hermit ha-presence-reportInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Call GetDateTime for the current time reference. Read the stored locale from .claude-code-hermit/OPERATOR.md under ## HA hermit (fall back to English if absent).
Read .claude-code-hermit/raw/snapshot-ha-normalized-latest.json.
"Context snapshot is stale — run
/claude-code-homeassistant-hermit:ha-refresh-contextfor accurate data."
entity_index to keys starting with person. or device_tracker.. If no matching keys exist, emit "no presence entities found — presence tracking isn't configured in this HA instance" and stop. Do not proceed to the history fetch.state field (home / away / unknown / unavailable) and last_changed → "since HH:MM" relative to now.state == "unavailable" OR last_changed is more than 48 hours ago (stale tracker).Run:
${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha fetch-history \
--window-days 7 \
--entities "device_tracker.*" "person.*" \
--include-transitions
This writes .claude-code-hermit/raw/snapshot-ha-history-7d-latest.json.
Read snapshot-ha-history-7d-latest.json. For each presence entity:
transitions (ordered chronologically), formatted as HH:MM DD-Mon — <state>.state_durations — what percentage of the window was "home" vs "away".transitions list by UTC hour, keyed on direction: transitions to home are arrivals, transitions to away are departures. Report the top 1–2 arrival hours and departure hours separately (e.g. "typically arrives around 18:00 UTC, leaves around 08:00 UTC"). With ≥7d of data and ≥5 total transitions, state the windows; below that threshold, say "insufficient data for pattern detection." (hour_histogram counts all events regardless of direction, so use it only as a fallback for entities whose states aren't home/away.)Compose and print the inline report in the operator's locale:
## Presence Report — <date>
### Current State
<per-entity: who is home/away/unknown, since when>
### Tracker Health
<list unreliable entities with reason; "All trackers healthy." if none>
### Recent Transitions (last 7 days)
<per-entity: last 5 home/away events with timestamp>
### Activity Patterns
<per-person: typical arrival/departure windows, or "insufficient data">
Write compiled/presence-report-<YYYY-MM-DD>.md with frontmatter:
title: "Presence Report — <YYYY-MM-DD>"
type: presence-report
created: <ISO 8601 with UTC offset>
session: <S-NNN from .claude-code-hermit/state/runtime.json .session_id, or null if absent>
tags: [presence, ha]
Body: the inline report from step 5.
Append a citation to .claude-code-hermit/sessions/SHELL.md under ### Artifacts produced this session:
- [[compiled/presence-report-<date>.md]]
Create the section if it doesn't exist; skip the SHELL.md step if the file is absent (no active session).
development
Evening house brief — end-of-day security check, device status, and energy snapshot. Runs as a daily routine at 22:30 or on demand.
tools
Browse and explain the hermit's Home Assistant automations — list by topic, filter by keyword with plain-language YAML explanations, or sort by last-fired. Read-only. Use when the operator asks "what automations do I have / what does this one do / which haven't fired."
tools
On-demand HA-voice brainstorm — reads entity inventory, automation/script listings, and operator intent to surface at most 2 capability-gap ideas, each gated by proposal-triage before becoming a PROP. Invoke when the operator asks "what automations am I missing?", "any coverage gaps?", or "brainstorm improvements". Never runs autonomously.
development
On-demand fitness-voice brainstorm — reads Strava history and training-goal signals to surface at most 2 coverage-gap or imbalance ideas, each gated by proposal-triage before becoming a PROP. Invoke when the operator asks "what am I neglecting?", "anything off with my training?", or "brainstorm training gaps". Never runs autonomously.