Skip to content

Add named Factory Reset ESP entity, mark script switch internal - #62

Merged
bharvey88 merged 1 commit into
betafrom
fix/factory-reset-entity
Jul 31, 2026
Merged

Add named Factory Reset ESP entity, mark script switch internal#62
bharvey88 merged 1 commit into
betafrom
fix/factory-reset-entity

Conversation

@bharvey88

@bharvey88 bharvey88 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Version: 26.7.31.1

What does this implement/fix?

CAST-1 had a single factory_reset switch, the one the boot button hold script drives, exposed to Home Assistant with disabled_by_default and no name: set. With no name it falls back to the device name, so there is no usable Factory Reset ESP entity on the device page and an unnamed disabled switch shows up instead.

This matches the pattern already used by AIR-1, MSR-2, MTR-1 and TEMP-1:

  • factory_reset_all with name: "Factory Reset ESP" and disabled_by_default: True, the user-facing entity.
  • factory_reset_switch marked internal: true, kept for the boot button hold script, which still calls id(factory_reset_switch).turn_on().

Version bumped to 26.7.31.1.

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

esphome config passes on both CAST-1_W.yaml and CAST-1_ETH.yaml. Not yet flashed to hardware.

The wiki Sensor Definitions page is being updated to Factory Reset ESP in a parallel docs PR.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added an optional “Factory Reset ESP” switch, disabled by default, for exposed factory-reset controls.
  • Bug Fixes

    • Updated the ESPHome version to 26.7.31.1.
    • Kept the existing factory-reset control internal to prevent unintended exposure.

The factory_reset switch driven by the boot button hold script was
exposed to Home Assistant with no name set, so it rendered as an
unnamed disabled switch and there was no usable Factory Reset entity
on the device page.

Matches the pattern already used by AIR-1, MSR-2, MTR-1 and TEMP-1: a
named user-facing factory_reset switch plus a separate internal one for
the script to drive.

Bumps version to 26.7.31.1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@bharvey88 bharvey88 added the bugfix Something isn't working label Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e097a666-0666-4d12-ba5c-cfd239a1da30

📥 Commits

Reviewing files that changed from the base of the PR and between 4e80e81 and eb8d17a.

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

Walkthrough

The ESPHome version changes to 26.7.31.1. A disabled-by-default public factory-reset switch is added. The existing factory-reset switch becomes internal.

Changes

ESPHome Core

Layer / File(s) Summary
ESPHome version update
Integrations/ESPHome/Core.yaml
The ESPHome version substitution changes to 26.7.31.1.
Factory-reset switch exposure
Integrations/ESPHome/Core.yaml
Adds the disabled-by-default factory_reset_all switch named "Factory Reset ESP". Changes factory_reset_switch to internal.

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

Possibly related PRs

Suggested reviewers: trevorschirmer

Poem

A rabbit checks the ESPHome leaf,
Finds version sprouts beneath the sheaf.
One reset switch waits out of sight,
One rests disabled, safe and light.
The core.yaml burrow is neat.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding the named Factory Reset ESP entity and marking the script switch internal.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/factory-reset-entity

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.

@bharvey88
bharvey88 merged commit 2408570 into beta Jul 31, 2026
9 checks passed
@bharvey88
bharvey88 deleted the fix/factory-reset-entity branch July 31, 2026 23:34
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.

1 participant