Skill: Grafana HA History
SkillMonitoring & opsUsing the Grafana Claude skill lets your agent look up past Home Assistant sensor readings and device states.
Use Skill: Grafana HA History in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Skill: Grafana HA History and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Skill: Grafana HA History
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Query historical Home Assistant entity state via Grafana's Home Assistant InfluxDB datasource (InfluxQL). Use when the user asks about past states, "was X on/off", "when did…", history for an entity, overnight activity, or numeric sensor series over a time window, not for current/live state.
What this skill tells your AI
The instructions your AI receives, as published by apocrathia/home-assistant-config in .agents/skills/grafana-ha-history/SKILL.md and read by Ahel’s review.
Purpose
Look up past Home Assistant entity state from Grafana → InfluxDB
(uid: homeassistant). Live/current state stays on the HA MCP.
When to Use
- "Was the garage open at 2am?"
- "When did the front door unlock last night?"
- "What was outdoor temp over the last 24h?"
- Any historical entity state / change timeline / numeric series
Not for current state — use HA MCP GetLiveContext (or equivalent) first.
Workflow
-
Resolve the entity — domain + object_id from the HA entity_id (
lock.back_door→ domainlock, object_idback_door). -
Route the question
- On/off, modes, locked/unlocked, open/closed, person home/away →
measurement
"state" - Continuous numbers (temp, power, humidity, …) → unit-named measurement
(
"°F","W","%", …)
- On/off, modes, locked/unlocked, open/closed, person home/away →
measurement
-
Pick a recipe in reference.md:
- Point-in-time (last value before T)
- Window changes (ordered events between T1 and T2)
- Numeric series (raw or downsampled)
-
Query via Grafana MCP
grafana_api_request:GET /api/datasources/proxy/uid/homeassistant/query?db=homeassistant&q=<URL-encoded InfluxQL> -
Answer with timestamps + values. Cite the InfluxQL used. Cap results with
LIMIT/ a tight time window. -
Empty result → verify
domain/entity_idtags (and measurement for numerics) before claiming there is no history. See traps in reference.md.
Hard rules
- Read-only. Do not write to Influx or mutate Grafana.
- Always URL-encode the
qparameter. - Influx tag
entity_idis the object_id only (no domain prefix). - Prefer
"state"+"value"fields on the"state"measurement for non-numeric entities. - Never invent measurement names — discover with
SHOW MEASUREMENTS/SHOW MEASUREMENTS WHERE "entity_id" = '…'when unsure.
Additional resources
- Schema, recipes, discovery queries, traps: reference.md
Signals
- GitHub stars
- 179
- Forks
- 32
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
grafana-ha-history- Source
- github.com/apocrathia/home-assistant-config
github.com/apocrathia/home-assistant-config
More in Monitoring & ops
Skill · anthropics
More in Monitoring & opsagent-eval
Skill · affaan-m
More in Monitoring & opspricing
Skill · coreyhaines31
More in Monitoring & opslark-okr
Skill · larksuite
More in Monitoring & opsdashboard-builder
Skill · affaan-m
More in Monitoring & opsbabysit
Skill · thedotmack
More in Monitoring & ops