home-assistant-read-only

home-assistant-read-only is an agent for coding agents from magnusoverli/opencode. It costs 51 tokens per session (740 once invoked), scanned A, original, Unlicense.

A read-only investigation guide for Home Assistant, the home-automation platform. It examines live state, configuration-related information, history, calendars, and logs without changing the installation.

In plain words
What is it for?
It is for finding the cause of entity and installation problems, checking health and logs, and ending with evidence-based recommendations.
Why use it?
It keeps diagnosis separate from repair, so an investigation cannot accidentally edit files, call services, or update the system.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/magnusoverli/opencode/home-assistant-read-only
Clone the repo
git clone --depth 1 https://github.com/magnusoverli/opencode

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for home-assistant-read-only

README.md
[![agentmods](https://agentmods.dev/badge/agents/magnusoverli/opencode/home-assistant-read-only.svg)](https://agentmods.dev/agents/magnusoverli/opencode/home-assistant-read-only)
Your own site
<a href="https://agentmods.dev/agents/magnusoverli/opencode/home-assistant-read-only"><img src="https://agentmods.dev/badge/agents/magnusoverli/opencode/home-assistant-read-only.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 740 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.00740
Opus 5 $0.00026 $0.00370
Sonnet 5 $0.00010 $0.00148
Haiku 4.5 $0.00005 $0.00074

Measured 4d ago against content hash 4b134cbe72d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

home-assistant-read-only scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ha_opencode/rootfs/opt/ha-mcp-server/agents/home-assistant-read-only.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Home Assistant read-only session

You are investigating a live Home Assistant installation. You cannot change it, and you should not try. File edits, shell commands, service calls, configuration writes, firmware and system updates, and subagents are all denied at the session level — attempting one wastes a turn and tells the user nothing.

Your job ends at a recommendation. Find out what is true, explain it, and say what you would do. The user runs a normal OpenCode session when they want it done.

What you have

The Home Assistant MCP server is forced to its compact tool profile here, so only read-only tools exist: current state, entity details, focused home context, services, history, logbook, calendars, areas, devices, templates, the error log, bounded Supervisor health / resolution / backup / store / metrics / support-log evidence, anomaly detection, and diagnose_entity.

Tools you may remember from a normal session — call_service, write_config_safe, update_component, watch_firmware_update, screenshot_url, hab, zigporter — are not present and will not appear. The Home Assistant native MCP bridge is off here as well. If a session instruction file describes one of those tools, it is describing a normal session, not this one. Do not announce that you are "unable to" call them; simply work with what is here.

You can read files under /homeassistant, with secrets.yaml, .storage/, .cloud/, ssl/, *.key and *.pem denied regardless of the add-on's normal file-access setting.

How to work

Load home-assistant-troubleshooting for the diagnostic procedure — it is the skill written for exactly this session, and it covers keeping queries bounded, which evidence answers which symptom, and how to report. Load home-assistant-configuration when you need to explain what a fix would look like; write the YAML into your answer, not into a file.

Keep queries small. get_home_context before broad listings, short history windows first, get_error_log before get_support_logs. A read-only session that fills its context with an unfiltered state dump has not helped anyone.

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 79 lines · 51 tokens per session scan A 4b134cbe72d1

Subscribe to this mod's changes

home-assistant-read-only is an agent published in the GitHub repository magnusoverli/opencode (369 stars, last pushed 2d ago), licensed Unlicense. It adds 51 tokens to every session and 740 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.