esphome-automations

esphome-automations is an agent for coding agents from nodnarbnitram/claude-code-extensions. It costs 71 tokens per session (7,020 once invoked), scanned A, original, MIT.

A specialist for ESPHome automation configurations, which control sensors, devices, and microcontrollers using YAML. It handles the rules that connect events to conditions and actions.

In plain words
What is it for?
Use it to build ESPHome triggers, conditions, actions, scripts, state machines, and complex automation rules.
Why use it?
It helps turn simple device events into reliable automation logic, including timing, reusable scripts, and state-based behavior. It also covers C++ lambda code when YAML alone is not enough.

Agent

Part of the cce-esphome plugin — 6 agents shipped together

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/nodnarbnitram/claude-code-extensions/esphome-automations
Clone the repo
git clone --depth 1 https://github.com/nodnarbnitram/claude-code-extensions

Or install cce-esphome, the plugin that ships this one along with the rest of its 6 agents.

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 esphome-automations

README.md
[![agentmods](https://agentmods.dev/badge/agents/nodnarbnitram/claude-code-extensions/esphome-automations.svg)](https://agentmods.dev/agents/nodnarbnitram/claude-code-extensions/esphome-automations)
Your own site
<a href="https://agentmods.dev/agents/nodnarbnitram/claude-code-extensions/esphome-automations"><img src="https://agentmods.dev/badge/agents/nodnarbnitram/claude-code-extensions/esphome-automations.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,020 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.00071 $0.07020
Opus 5 $0.00036 $0.03510
Sonnet 5 $0.00014 $0.01404
Haiku 4.5 $0.00007 $0.00702

Measured yesterday against content hash 63c2c6b7f539, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

esphome-automations 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 yesterday.

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.

plugins/cce-esphome/agents/esphome-automations.md · 1,181 lines

How it starts

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

Purpose

You are a specialized ESPHome automations expert with deep knowledge of triggers, conditions, actions, lambdas, scripts, and state management. Your expertise covers the entire automation model from simple button presses to complex state machines running entirely on microcontrollers.

Instructions

When invoked, follow these steps:

  1. Identify Automation Pattern: Determine the type of automation needed (trigger-based, time-based, state machine, etc.)
  2. Select Appropriate Triggers: Choose the right trigger type for the use case
  3. Design Condition Logic: Apply conditions to filter when actions execute
  4. Implement Actions: Build the action sequence with proper flow control
  5. Consider Script Usage: Evaluate if reusable scripts benefit the design
  6. Apply Best Practices: Debouncing, hysteresis, timeout patterns, resource management
  7. Generate Complete YAML: Provide production-ready configuration with comments

Automation Architecture Overview

The ESPHome Automation Model

ESPHome automations follow a Trigger -> Condition -> Action flow:

binary_sensor:
  - platform: gpio
    pin: GPIO4
    on_press:                    # TRIGGER: Event that starts automation
      - if:
          condition:             # CONDITION: Decides if actions run
            binary_sensor.is_on: motion_detected
          then:                  # ACTION: What happens when triggered
            - light.turn_on: hallway_light

Key Principles:

  • Microcontroller autonomy: All automations execute locally, work offline
  • Event-driven: Triggers fire on state changes, time events, or component events
  • Composable: Combine multiple triggers, conditions, and actions
  • No cloud dependency: Logic compiled into firmware, runs independently

2025 Performance Optimizations

ESPHome 2025 introduced significant performance improvements:

  1. Memory Allocations Reduced 83%: Using const references (pass-by-reference instead of pass-by-value) in automation callbacks
  2. Ultra-Low Latency Events: Event processing reduced from 0-16ms to ~12 microseconds
    • Benefits: BLE, MQTT, ESP-NOW, wake word detection
    • Critical for time-sensitive automations

Read the full file on GitHub · 1,181 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. yesterday First seen · 1,181 lines · 71 tokens per session scan A 63c2c6b7f539

Subscribe to this mod's changes

esphome-automations is an agent published in the GitHub repository nodnarbnitram/claude-code-extensions (16 stars, last pushed 4mo ago), licensed MIT. It adds 71 tokens to every session and 7,020 once invoked, about $0.0004 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-09-03.

Related

Other agents, from other repositories

apple-neural-performance-expert

Use this agent when you need expert guidance on optimizing neural network operations on Apple platforms, including Metal Performance Shaders (MPS), MLX framework optimization, low-level array operations, GPU kernel optimization, memory management for ML workloads, or performance profiling of neural network code. This…

FluidInference/FluidAudio · 0 tokens

antenna-engineer

Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…

K-Dense-AI/scientific-agents · 97 tokens

fabricator

3D printing and additive manufacturing specialist covering FDM, SLA, and SLS processes from model preparation through troubleshooting.

pjt222/agent-almanac · 25 tokens

cocotb-reviewer

RAT audit protocol (condensed; dev source: plugindocs/agent-lib/audit-output-protocol.md — plugin-internal, do NOT Read it at runtime).

babyworm/rtl-agent-team · 51 tokens

labview-class-generator

Creates LabVIEW classes end to end — settles the data model, writes each .lvclass with its private data control through NI's own project provider VIs, links inheritance, creates INTERFACES and links a class to the ones it implements, binds .ctl typedef fields so they point at the file rather than carrying a de-linked…

Zuehlke/labview-mcp · 404 tokens

persona-high

Simulated senior IC designer with full datasheet / PDK / corner fluency. Specifies CRC polynomials, bit-period cycles, opcode hex, GF180MCU 5V corners. Pushes back hard when the AI hand-waves and demands datasheet-section traceability. Drives the IC Expert Agent (plain-language register) during Phase-1 training to…

vibeic/vibe-ic · 111 tokens