Skip to content

ESK: add Using Secrets tutorial#782

Merged
bharvey88 merged 1 commit into
devfrom
docs/esk-using-secrets
May 12, 2026
Merged

ESK: add Using Secrets tutorial#782
bharvey88 merged 1 commit into
devfrom
docs/esk-using-secrets

Conversation

@bharvey88
Copy link
Copy Markdown
Contributor

@bharvey88 bharvey88 commented May 12, 2026

Summary

Adds a new Tutorials subsection under ESPHome Starter Kit, with a first page covering secrets.yaml beyond Wi-Fi. The Getting Started page already introduces secrets.yaml for Wi-Fi only; this tutorial picks up from there and covers the other values most users end up storing.

The page walks through:

  • What secrets.yaml is and why to use it
  • Opening it in ESPHome Device Builder (reuses existing esphome-device-builder-click-secrets.gif and esphome-device-builder-secrets.png assets)
  • !secret syntax
  • Sectioned entries with the secrets.yaml line and the device YAML line side by side for: Wi-Fi, fallback hotspot password, Home Assistant API encryption key, OTA password, web_server: auth, and MQTT broker/username/password
  • A complete example secrets.yaml
  • Good practice notes (don't share, keep a backup, rotate in one place)

Nav now reads:

ESPHome Starter Kit:
  - First Steps
  - Getting Started
  - Tutorials:
      - Using Secrets

URL slug: /tutorials/using-secrets/.

Test plan

  • Page renders in CloudCannon preview on dev
  • Sidebar shows the new Tutorials → Using Secrets entry under ESPHome Starter Kit
  • Both image assets resolve
  • Link from this page back to Getting Started works

Summary by CodeRabbit

  • Documentation
    • New tutorial documentation on securely storing and managing Wi-Fi credentials, API keys, and other sensitive configuration data in ESPHome projects. Includes practical examples and best practices for handling secret values.

Review Change Stack

Adds a Tutorials subsection under ESPHome Starter Kit with a guide to
using secrets.yaml beyond Wi-Fi: API encryption key, OTA password,
web_server auth, MQTT broker/username/password, and fallback hotspot
password, each with the secrets.yaml entry and the device YAML
reference. Ends with a complete example secrets.yaml.
@bharvey88 bharvey88 merged commit 2542836 into dev May 12, 2026
@bharvey88 bharvey88 deleted the docs/esk-using-secrets branch May 12, 2026 20:40
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e5a0284b-d6c0-410b-9f60-f7a8531c7325

📥 Commits

Reviewing files that changed from the base of the PR and between d3ec15b and cf5e6d7.

📒 Files selected for processing (2)
  • docs/products/ESPHome-Starter-Kit/tutorials/using-secrets.md
  • mkdocs.yml

Walkthrough

This PR adds a new tutorial documenting ESPHome Device Builder's secrets.yaml file, explaining its purpose for secure credential storage, the !secret reference syntax, practical examples for common credentials across multiple features, and best practices. The tutorial is integrated into the site navigation structure.

Changes

ESPHome Secrets Usage Tutorial

Layer / File(s) Summary
Concept and accessor explanation
docs/products/ESPHome-Starter-Kit/tutorials/using-secrets.md
Introduction to secrets.yaml purpose and the !secret <key> syntax, with documentation of build-failure behavior when keys are missing.
Practical per-feature examples
docs/products/ESPHome-Starter-Kit/tutorials/using-secrets.md
Detailed structured guidance on storing Wi‑Fi credentials, fallback hotspot password, Home Assistant API encryption key, OTA password, web server credentials, and MQTT settings, with corresponding device YAML reference patterns for each.
Complete example and best practices
docs/products/ESPHome-Starter-Kit/tutorials/using-secrets.md
Combined secrets.yaml reference example covering all credential types, clarification that not every device needs every entry, security best-practice notes, and recommended next steps including re-flashing and resource links.
Navigation and discoverability
mkdocs.yml
Updated site navigation to add a new Tutorials subsection under ESPHome Starter Kit, linking to the "Using Secrets" tutorial page.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🐰 A guide to secrets so fair,
Where credentials safely rest with care,
No Wi‑Fi keys in configs bare,
Just !secret everywhere,
And next steps bloom beyond compare! 🌿

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/esk-using-secrets

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 and usage tips.

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