Skip to content

[esphome] Document esphome.build_flags option#6689

Open
swoboda1337 wants to merge 2 commits into
esphome:nextfrom
swoboda1337:esphome-build-flags
Open

[esphome] Document esphome.build_flags option#6689
swoboda1337 wants to merge 2 commits into
esphome:nextfrom
swoboda1337:esphome-build-flags

Conversation

@swoboda1337
Copy link
Copy Markdown
Member

Description

Documents the new top-level `esphome.build_flags` option, which adds extra compiler flags to the build and works on both the PlatformIO and native ESP-IDF backends. Complements (and does not replace) the existing PlatformIO-only `esphome.platformio_options.build_flags`.

Related issue (if applicable): N/A

Pull request in esphome with YAML changes (if applicable):

Checklist

  • I am merging into `next` because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into `current` because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in `/src/content/docs/components/index.mdx` when creating new documents for new components or cookbook.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 25, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit fa5da46
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6a144c3544c7af0008ee93c6
😎 Deploy Preview https://deploy-preview-6689--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for the new top-level esphome.build_flags option, clarifying how it differs from the existing PlatformIO-only esphome.platformio_options.build_flags and how flags are handled across build backends.

Changes:

  • Documented the new esphome.build_flags advanced option in the configuration variable list.
  • Added a dedicated build_flags section with example YAML and backend-specific behavior notes.

Comment thread src/content/docs/components/esphome.mdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants