Skip to content

Fix ESPHome dev build: replace deprecated Select .state with current_option()#41

Merged
TrevorSchirmer merged 4 commits into
betafrom
fix/select-state-dev-compat
Jul 7, 2026
Merged

Fix ESPHome dev build: replace deprecated Select .state with current_option()#41
TrevorSchirmer merged 4 commits into
betafrom
fix/select-state-dev-compat

Conversation

@TrevorSchirmer

@TrevorSchirmer TrevorSchirmer commented Jul 7, 2026

Copy link
Copy Markdown
Member

Version: 26.7.7.1

What does this implement/fix?

Fixes the CI dev-channel build failure:

'class esphome::template_::TemplateSelect<...>' has no member named 'state'

ESPHome removed the deprecated std::string state member from select entities on the dev branch (deprecated in 2026.1.0, removed for 2026.7.0). The apply_ota_source script lambda in Integrations/ESPHome/Core.yaml read .state on the firmware_selector and firmware_channel selects, which no longer compiles against dev.

This switches the lambda to the replacement accessor current_option(), which returns a StringRef that compares directly against string literals. current_option() exists since ESPHome 2026.1.0, well within this config's min_version: 2026.6.0, so stable, beta, and dev all compile. Runtime behavior is unchanged.

Also bumps the firmware version to 26.7.7.1 per convention.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the ESPHome configuration to the latest version.
    • Improved OTA source selection so firmware choices are determined more reliably based on the selected options.

dependabot Bot and others added 3 commits June 22, 2026 00:14
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [esphome/workflows/.github/workflows/build.yml](https://github.com/esphome/workflows) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/checkout` from 6.0.3 to 7.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](actions/checkout@v6.0.3...v7)

Updates `esphome/workflows/.github/workflows/build.yml` from 2025.10.0 to 2026.4.1
- [Release notes](https://github.com/esphome/workflows/releases)
- [Commits](esphome/workflows@e7eee2a...025a1e6)

Updates `actions/download-artifact` from 7.0.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@37930b1...3e5f45b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: esphome/workflows/.github/workflows/build.yml
  dependency-version: 2026.4.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
…s/github-actions-3758148135

chore(ci): bump the github-actions group with 3 updates
…option()

ESPHome removed the deprecated std::string state member from select
entities on the dev branch (deprecated 2026.1.0, removal 2026.7.0),
which broke the CI dev-channel build:
'class esphome::template_::TemplateSelect<...>' has no member named 'state'

current_option() is available since 2026.1.0, well within this
config's min_version of 2026.6.0. Runtime behavior is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the bugfix Something isn't working label Jul 7, 2026
@github-actions github-actions Bot requested a review from bharvey88 July 7, 2026 15:35
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@TrevorSchirmer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 09d44ff5-4dae-43ac-9fbd-9f1183809ac3

📥 Commits

Reviewing files that changed from the base of the PR and between 2d2d311 and 8cbe466.

📒 Files selected for processing (1)
  • Integrations/ESPHome/Core.yaml

Walkthrough

This change updates the ESPHome Core.yaml version string and modifies the apply_ota_source script to determine Ethernet and Beta selector states using current_option() comparisons instead of .state string comparisons.

Changes

Core.yaml Update

Layer / File(s) Summary
Version bump and OTA selector logic
Integrations/ESPHome/Core.yaml
Version updated from 26.6.18.1 to 26.7.7.1; eth and beta boolean checks in apply_ota_source now use current_option() instead of .state.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A hop, a skip, a version bump,
Selectors now don't miss a jump,
current_option() leads the way,
OTA sources light of day,
This bunny cheers—hip hip, hooray! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: replacing deprecated ESPHome Select .state usage with current_option() to fix the dev build.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/select-state-dev-compat

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TrevorSchirmer TrevorSchirmer changed the base branch from main to beta July 7, 2026 15:38
@TrevorSchirmer TrevorSchirmer merged commit ad0b307 into beta Jul 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants