Skip to content

Add API encryption (no pre-configured key)#99

Merged
bharvey88 merged 1 commit into
betafrom
add-api-encryption
Jul 9, 2026
Merged

Add API encryption (no pre-configured key)#99
bharvey88 merged 1 commit into
betafrom
add-api-encryption

Conversation

@bharvey88

@bharvey88 bharvey88 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Version: 26.7.9.1 (no change — folds into the pending release)

What does this implement/fix?

Adds encryption: to the api: block with no pre-configured key. The key is
set during Home Assistant adoption and saved to flash, so it persists across
OTA/firmware updates — no key is committed to the repo.

Confirmed against the ESPHome source: a bare encryption: validates (key is
optional), and with no key the device lets a client supply a noise key that's
saved to flash for future connections. Non-breaking — unencrypted clients keep
working until a key is set.

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

  • New Features
    • Added support for encryption setup during device adoption, helping secure connections be preserved across firmware updates.
  • Bug Fixes
    • Improved compatibility so existing unencrypted clients continue working until encryption is configured.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 02125ecb-da6a-4f3e-be5a-7225a2d4d0da

📥 Commits

Reviewing files that changed from the base of the PR and between c455490 and 9a00325.

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

Walkthrough

Added an empty encryption: stanza under the api: section in Integrations/ESPHome/Core.yaml.

Changes

ESPHome Core Configuration

Layer / File(s) Summary
Add encryption block to api config
Integrations/ESPHome/Core.yaml
Adds an empty encryption: stanza under api:.

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

Poem

I hopped through YAML, neat and small,
An empty key went in the wall.
No carrots lost, no crumbs askew,
Just silent shelter, crisp and new.
🐇

🚥 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 change: enabling API encryption without committing a preconfigured key.
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 add-api-encryption

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.

The encryption key is set during Home Assistant adoption and saved to
flash, so it persists across OTA/firmware updates. No key is committed to
the repo. Non-breaking: unencrypted clients keep working until a key is set.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@bharvey88
bharvey88 force-pushed the add-api-encryption branch from c455490 to 9a00325 Compare July 9, 2026 17:49
@bharvey88
bharvey88 merged commit 9134ab2 into beta Jul 9, 2026
10 checks passed
@bharvey88
bharvey88 deleted the add-api-encryption branch July 9, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant