원클릭으로
home-assistant
Query a Home Assistant instance for presence, sensor data, calendar events, and cameras
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Query a Home Assistant instance for presence, sensor data, calendar events, and cameras
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add foundational CS knowledge (7 classic books) and session-memory search to Claude Code or Claude Desktop via MCP. Lets Claude answer "how does X work?" by querying indexed books inline, and "what did we discuss about Y?" by searching past sessions. Use this skill when setting up or troubleshooting the rag-mcp-server.
Analyze your gptme conversation history for insights like token usage, costs, model preferences, and usage patterns — inspired by Spotify Wrapped.
Guide to creating gptme plugins with tools, hooks, and commands — covers ToolSpec, lifecycle hooks, custom /commands, testing, and pyproject.toml setup.
Conduct a structured interview about a new project and generate a ready-to-use CLAUDE.md/AGENTS.md starter so the agent knows your conventions from session one.
Use when creating or revising an agent's SOUL.md, splitting runtime voice out of broader identity docs, or tightening a vague persona file into a short, opinionated, voice-only artifact without changing the agent's core identity.
Comprehensive framework for effective gptme agent onboarding that builds user trust, communicates capabilities clearly, and establishes productive working relationships from the first interaction.
| name | home-assistant |
| description | Query a Home Assistant instance for presence, sensor data, calendar events, and cameras |
| category | Agent Infrastructure |
| tags | ["home-assistant","iot","context","location","presence"] |
| license | MIT |
| compatibility | Requires HA_HOST and HA_API_KEY env vars |
| metadata | {"author":"bob","version":"1.0.0","tags":"home-assistant,iot,context,location,presence","requires_tools":"","requires_skills":""} |
| keywords | ["home assistant","is person home","ha.py status","person presence","home assistant sensor"] |
Query a Home Assistant instance for presence, sensor data, calendar events, and cameras.
Credentials in .env at your agent workspace root:
HA_HOST=https://<your-ha-host>
HA_API_KEY=<long-lived-access-token>
Cloud connectivity: If your HA instance uses Nabu Casa, the host resolves publicly
(CNAME → *.ui.nabu.casa). No /etc/hosts entry or VPN needed.
Generate a long-lived token: HA UI → Profile → Long-Lived Access Tokens → Create.
HA=gptme-contrib/skills/home-assistant/scripts/ha.py
# Test connectivity
uv run python3 $HA status
# Owner's current location / presence
uv run python3 $HA location
# Full real-world context (location, weather, next event, recent automations)
# — useful before voice calls, standups, or scheduling decisions
uv run python3 $HA context
uv run python3 $HA --json context
# All person/device tracker states
uv run python3 $HA persons
# Upcoming calendar events
uv run python3 $HA calendar
# List all cameras
uv run python3 $HA cameras
# Get any entity state
uv run python3 $HA state <entity_id>
# List all entities (optionally filtered by domain)
uv run python3 $HA states
uv run python3 $HA states --domain sensor
uv run python3 $HA states --domain device_tracker
# JSON output for scripting
uv run python3 $HA location --json
HA entity IDs follow predictable patterns — discover yours with ha.py states:
| Domain | Example | Notes |
|---|---|---|
person.<name> | person.alice | state: home/away/zone_name |
device_tracker.* | device_tracker.alice_phone | GPS source for person entity |
sensor.*_battery_level | sensor.alice_phone_battery_level | % |
calendar.main | calendar.main | Primary Google calendar |
weather.forecast_* | weather.forecast_home | Current weather |
camera.* | camera.front_door | Camera snapshot |
zone.home | zone.home | Home geofence |
Use ha.py states --domain sensor to browse what's available on your instance.
Base URL: $HA_HOST/api/
Auth header: Authorization: Bearer $HA_API_KEY
Key endpoints:
GET /api/states — all entity statesGET /api/states/<entity_id> — single entityGET /api/config — HA config (location, timezone)GET /api/calendars/<entity_id>?start=<iso-utc>&end=<iso-utc> — calendar events (note: Z suffix required for UTC, not +00:00)GET /api/camera_proxy/<entity_id> — camera snapshot (binary JPEG)If the agent's Google account is shared as a reader on the owner's main calendar,
use gog (gogcli) directly without HA:
# Upcoming events
gog calendar events "<owner-google-account>" --results-only -j
# Compact view
gog calendar events "<owner-google-account>" --results-only -j | python3 -c "
import json, sys
for e in json.load(sys.stdin):
start = e.get('start', {}).get('dateTime', e.get('start', {}).get('date', '?'))[:16]
print(f'{start} {e.get(\"summary\", \"(no title)\")}')
"
HA_HOST and HA_API_KEY to their .envgptme-contrib/skills/home-assistant/scripts/ha.pyFor Google Calendar: share the owner's calendar with the agent's Google account (reader access).