ESPHome’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/esphome/esphome.io/llms.txt
Use this file to discover all available pages before exploring further.
external_components feature lets you pull in components that are not part of the standard ESPHome release — whether they live on GitHub, in a local folder on your machine, or in a forked copy of ESPHome itself. You can also use external_components to override a built-in component with a patched version without touching the main ESPHome installation.
If you want to create your own components for ESPHome, see the ESPHome Developer Site for guides on writing Python schema validators and C++ component code.
Quick Start Examples
Configuration Variables
The location of the components. Accepts either a
local or git source type, or a GitHub/PR shorthand string.type (required): local or git(git sources only) Repository URL. May use
http://, https://, or file:// (absolute path) schemes.(git sources only) Git branch or tag to check out. If not specified, the default branch is used.
(git sources only) Username for authenticated git servers. Combine with
!secret to keep credentials out of your YAML.(git sources only) Password for authenticated git servers.
Local sources: path to the folder containing components.
Git sources (optional): sub-directory inside the repo where components live, if it is not the standard
Git sources (optional): sub-directory inside the repo where components live, if it is not the standard
components/ or esphome/components/ folder.The list of component names to load from this source. If omitted, all components found in the source are loaded.
How often ESPHome checks the git repository for updates. Has no effect on
local sources. Set to 0s to check on every validation. Set to never to freeze at the current commit (recommended when ref points to a tag). Defaults to 1day.Local Sources
Local components are the simplest option — point ESPHome at a folder and it loads components from there. Relative paths are resolved from the directory containing your YAML file.Required Folder Structure
my_components/ becomes one loadable component. ESPHome does not check the path further — the folder name is the component name.
GitHub Sources
Git-based components are cloned into a cache directory inside.esphome/ the first time they are used. Subsequent builds reuse the cached copy and only pull updates after the refresh: interval has elapsed.
Standard GitHub Repository
GitHub Shorthand
Pull Request Shorthand
Test a not-yet-merged ESPHome pull request:Forked ESPHome Repository
If the component lives inside a fork of ESPHome (underesphome/components/), use the full git source. ESPHome automatically looks in both components/ and esphome/components/ inside the repo:
Local Git Repository
Useful for testing changes to a locally cloned repo before pushing upstream:Pinning and Caching Behavior
ESPHome caches each(url, ref) pair separately under .esphome/. Two entries pointing to the same URL but different ref values are treated as independent repositories and updated independently.
Overriding Built-in Components
external_components can replace a bundled ESPHome component entirely. This is useful for applying a patch without waiting for an official release:
Authenticated Repositories
For private repositories, supply credentials using!secret to avoid storing them in plain text:
Credentials are stored in clear text inside the
.esphome/ cache directory as part of the cloned repository URL. Do not commit the .esphome/ directory to version control.API Stability
There is no formal stability guarantee for the ESPHome component API. Internal APIs and the Python schema validation interface may change between ESPHome releases, which can break external components. When distributing a component for community use, document which ESPHome versions it has been tested against and encourage users to pin to compatible versions usingrefresh: never and a specific git tag.