This skill should be used when the user asks to "create an esphome config", "set up an esp32 device", "configure esphome yaml", "add a sensor to esphome", "fix esphome compile error", or mentions...
Rapid ESPHome configuration generation and troubleshooting skill with ready-to-use templates, GPIO reference guides, and validation utilities.
This skill accelerates ESPHome device configuration by providing:
Use this skill for general ESPHome configuration tasks. For ESP32-S3-BOX-3 specific implementations, use the esphome-box3-builder skill instead.
Use this skill when:
Delegate to specialized ESPHome agents for:
Located in templates/ directory:
basic-device.yaml - Minimal ESP32 starter
sensor-node.yaml - Temperature/humidity sensor node
relay-switch.yaml - 4-channel relay controller
display-node.yaml - Display with sensors
To use a template:
Template Workflow:
# 1. Read template
cat .claude/skills/esphome-config-helper/templates/sensor-node.yaml
# 2. Copy to project
cp .claude/skills/esphome-config-helper/templates/sensor-node.yaml my-device.yaml
# 3. Edit with device-specific values
# - Update device name
# - Set WiFi credentials (use secrets.yaml)
# - Adjust GPIO pins if needed
# - Customize sensor names
# 4. Validate (see Validation Workflow)
For detailed GPIO pinouts and safe pin selection, consult:
references/gpio-pinouts.md - Complete ESP32 and ESP8266 GPIO referenceQuick Safe Pins:
Avoid (strapping/boot pins):
For detailed sensor configurations with wiring diagrams, consult:
references/common-sensors.md - Top 20 sensor configurationsQuick Sensor Recommendations:
I²C Sensor (BME280 example):
i2c:
sda: GPIO21
scl: GPIO22
scan: true
sensor:
- platform: bme280
temperature:
name: "Temperature"
humidity:
name: "Humidity"
pressure:
name: "Pressure"
address: 0x76
update_interval: 60s
GPIO Sensor (DHT22 example):
sensor:
- platform: dht
pin: GPIO4
model: DHT22
temperature:
name: "Temperature"
humidity:
name: "Humidity"
update_interval: 60s
Binary Sensor (PIR motion):
binary_sensor:
- platform: gpio
pin: GPIO14
name: "Motion Sensor"
device_class: motion
For complete error message lookup table and solutions, consult:
references/troubleshooting.md - Comprehensive error message referenceCommon Error Quick Reference:
| Error Message | Quick Fix |
|---|---|
| "Unknown platform" | Check component name spelling, ensure platform supported |
| "GPIO already in use" | Check GPIO pin assignments, avoid duplicates |
| "Could not compile" | Check YAML syntax, verify indentation (2 spaces) |
| "WiFi connection failed" | Verify SSID/password, check signal strength, use static IP |
| "Sensor not found" | Check I²C address (use scan: true), verify wiring |
| "OTA upload failed" | Check device reachable, verify OTA password, restart device |
When encountering errors:
esphome logs device.yaml to see runtime errorsreferences/troubleshooting.md for specific errorThe validation utility provides quick configuration checks:
Script: scripts/validate-config.sh
Usage:
# Validate configuration
./.claude/skills/esphome-config-helper/scripts/validate-config.sh my-device.yaml
# The script runs:
# 1. esphome config my-device.yaml (syntax check)
# 2. esphome compile my-device.yaml (compilation test)
Validation Steps:
Syntax validation: esphome config my-device.yaml
Compilation test: esphome compile my-device.yaml
Fix errors: If validation fails:
references/troubleshooting.mdBefore flashing device:
Organize configuration in logical sections:
# 1. Core platform
esphome:
name: device-name
friendly_name: Device Name
esp32:
board: esp32dev
framework:
type: arduino
# 2. Network
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
encryption:
key: !secret api_encryption_key
ota:
- platform: esphome
password: !secret ota_password
# 3. Logging
logger:
web_server:
# 4. Components (sensors, switches, etc.)
sensor:
# ...
binary_sensor:
# ...
Use secrets.yaml for sensitive data:
secrets.yaml:
wifi_ssid: "MyNetwork"
wifi_password: "MyPassword123"
api_encryption_key: "base64-generated-key"
ota_password: "SecureOTAPassword"
Reference in config:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Follow consistent naming:
bedroom-sensor)"Bedroom Temperature")temp_sensor)Example:
sensor:
- platform: dht
pin: GPIO4
temperature:
name: "Living Room Temperature"
id: living_room_temp
humidity:
name: "Living Room Humidity"
id: living_room_humidity
ESP32-S3-BOX-3 projects: Use esphome-box3-builder skill
Deep technical questions: Delegate to ESPHome agents
Complex projects: Combine resources
For detailed information, consult:
references/gpio-pinouts.md - Complete ESP32/ESP8266 GPIO reference with safe pins, strapping pins, and pin capabilitiesreferences/common-sensors.md - Top 20 sensor configurations with wiring diagrams, platform selection, and usage examplesreferences/troubleshooting.md - Comprehensive error message lookup table with solutions for compilation, runtime, and hardware issuesWorking configuration examples in templates/:
basic-device.yaml - Minimal ESP32 foundationsensor-node.yaml - DHT22 temperature/humidity noderelay-switch.yaml - 4-channel relay controllerdisplay-node.yaml - OLED display with sensorsValidation and testing tools in scripts/:
validate-config.sh - ESPHome configuration validation wrapperFor new ESPHome device:
references/gpio-pinouts.mdscripts/validate-config.shreferences/troubleshooting.mdFor adding to existing config:
references/gpio-pinouts.mdThis skill provides rapid configuration generation for common ESPHome use cases. For specialized hardware (ESP32-S3-BOX-3) or deep technical questions, use the appropriate specialist skills and agents.