gptme/gptme-contrib/home-assistant

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Query a Home Assistant instance for presence, sensor data, calendar events, and cameras

Install

npx vskill@latest install gptme/gptme-contrib/home-assistant

SKILL.md

Home Assistant Skill

Query a Home Assistant instance for presence, sensor data, calendar events, and cameras.

Setup

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.

Quick Commands

bash
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

Common Entity ID Patterns

HA entity IDs follow predictable patterns — discover yours with ha.py states:

DomainExampleNotes
person.<name>person.alicestate: home/away/zone_name
device_tracker.*device_tracker.alice_phoneGPS source for person entity
sensor.*_battery_levelsensor.alice_phone_battery_level%
calendar.maincalendar.mainPrimary Google calendar
weather.forecast_*weather.forecast_homeCurrent weather
camera.*camera.front_doorCamera snapshot
zone.homezone.homeHome geofence

Use ha.py states --domain sensor to browse what's available on your instance.

REST API Reference

Base URL: $HA_HOST/api/ Auth header: Authorization: Bearer $HA_API_KEY

Key endpoints:

  • GET /api/states — all entity states
  • GET /api/states/<entity_id> — single entity
  • GET /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)

Google Calendar (Alternative)

If the agent's Google account is shared as a reader on the owner's main calendar, use gog (gogcli) directly without HA:

bash
# 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)\")}')
"

Giving Another Agent the Same Capability

  1. SSH to the other agent's VM
  2. Add HA_HOST and HA_API_KEY to their .env
  3. Pull latest gptme-contrib — the script is at gptme-contrib/skills/home-assistant/scripts/ha.py

For Google Calendar: share the owner's calendar with the agent's Google account (reader access).

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
15
Repository forks
19
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gptme/gptme-contrib/home-assistant/badge)](https://verified-skill.com/skills/gptme/gptme-contrib/home-assistant)

Something wrong with this skill or its page? Tell us.