My ESPHome Workshop

GitHub

Substitutions

core substitutions

Define reusable variables for ESPHome configurations

Official Documentation

📚 ESPHome Documentation →

Overview

Substitutions allow you to define variables in your ESPHome configuration that can be reused throughout the file, making configurations more maintainable and easier to adapt.

Notes

I use it nearly everywhere, especially for examples. It is handy to use substitutions for GPIOs since different devices uses different GPIOs for SPI, I2C etc.

← Back to all components