Skip to content

Commit d6b8b6d

Browse files
committed
Merge branch 'next'
2 parents 6d03b4e + 486f4fc commit d6b8b6d

File tree

3,009 files changed

+128614
-126285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,009 files changed

+128614
-126285
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
22
"name": "ESPHome - docs",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.12",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.13",
44
"postCreateCommand": ".devcontainer/postCreate.sh",
55
"postAttachCommand": "make live-html",
6-
"forwardPorts": [8000],
6+
"forwardPorts": [
7+
8000
8+
],
79
"features": {
810
"ghcr.io/devcontainers/features/github-cli:1": {}
911
},
1012
"customizations": {
1113
"vscode": {
12-
"extensions": ["ms-python.python"]
14+
"extensions": [
15+
"ms-python.python"
16+
]
1317
}
1418
}
1519
}

.devcontainer/postCreate.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/bin/bash
2+
set -euo pipefail
23

4+
sudo apt update && sudo apt install -y hugo
35

4-
pip3 install -r requirements.txt -r requirements_test.txt
5-
curl -L https://github.com/CloudCannon/pagefind/releases/download/v1.1.0/pagefind-v1.1.0-x86_64-unknown-linux-musl.tar.gz | tar -xz -C ~/.local/bin
6+
pip3 install -r requirements_test.txt
7+
pre-commit install
8+
9+
mkdir -p ~/.local/bin
10+
11+
ARCH="$(uname -m)"
12+
case "$ARCH" in
13+
x86_64) PAGEFIND_ARCH="x86_64" ;;
14+
arm64|aarch64) PAGEFIND_ARCH="aarch64" ;;
15+
*)
16+
echo "Unsupported architecture: $ARCH" >&2
17+
exit 1
18+
;;
19+
esac
20+
curl -L "https://github.com/CloudCannon/pagefind/releases/download/v1.3.0/pagefind-v1.3.0-${PAGEFIND_ARCH}-unknown-linux-musl.tar.gz" \
21+
| tar -xz -C ~/.local/bin

.github/copilot-instructions.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# ESPHome Documentation AI Collaboration Guide
2+
3+
This document provides context for AI models interacting with this project.
4+
Adhering to these guidelines will promote consistency and content quality.
5+
6+
## Project Overview & Purpose
7+
8+
* **Primary Goal:** ESPHome is a system to configure microcontrollers (like ESP32, ESP8266, RP2040, and LibreTiny-based chips)
9+
using simple yet powerful YAML configuration files. It generates C++ firmware that can be compiled and flashed to
10+
these devices, allowing users to control them remotely through home automation systems.
11+
12+
This repo is the source for the primary documentation for users of ESPHome, published on [esphome.io](https://esphome.io).
13+
* **Business Domain:** Internet of Things (IoT), Home Automation.
14+
15+
## Core Technologies & Stack
16+
17+
* **Languages:** HTML, CSS, Markdown, Go templates
18+
* **Frameworks & Runtimes:** Hugo and Pagefind
19+
* **Key Libraries/Dependencies:**
20+
* **Hugo:** For building the static site.
21+
* **Pagefind:** For client-side text searching
22+
23+
## Architectural Patterns
24+
25+
See the README.md file.
26+
27+
## Branches
28+
29+
* **Current**
30+
The `current` branch represents the published documentation in sync with the latest ESPHome release.
31+
PRs may be raised against this where they contain documentation revisions only.
32+
* **Next**
33+
The `next` branch is where changes are made via PR corresponding to new features in the ESPHome code repo
34+
(esphome/esphome). When a release is made this branch is merged into current.
35+
36+
## Development & Testing Workflow
37+
38+
See the README.md file
39+
40+
## Contribution Workflow (Pull Request Process)
41+
1. **Fork:** Fork the repository.
42+
1. **Branch:** Create a new branch in your fork from the appropriate base branch (`current` or `next`.)
43+
1. **Make Changes:** Adhere to all coding conventions and patterns.
44+
1. **Test:** Use the `make live-html` command to invoke hugo in server mode for instant preview.
45+
1. **Commit:** Commit your changes. There is no strict format for commit messages.
46+
1. **Pull Request:** Submit a PR against the base branch. The Pull Request title should have a prefix of the component being worked on (e.g., `[display] Add new examples`, `[abc123] Add new component`). Pull requests should always be made with the PULL_REQUEST_TEMPLATE.md template filled out correctly.
47+
48+
## Guidelines for AI generated reviews and PR summaries
49+
50+
Avoid the use of flowery language and weasel-words that add no useful content; Keep comments concise and technically
51+
accurate - you are not writing a press release.
52+
For example instead of "Created comprehensive documentation with configuration examples and setup instructions"
53+
it is sufficient to say "Created documentation with examples and instructions".
54+
55+

.github/workflows/auto-label-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
if: github.event.action != 'labeled' || github.event.sender.type != 'Bot'
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v4.2.2
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3030

3131
- name: Generate a token
3232
id: generate-token
33-
uses: actions/create-github-app-token@v2.0.6
33+
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
3434
with:
3535
app-id: ${{ secrets.ESPHOME_GITHUB_APP_ID }}
3636
private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }}
3737

3838
- name: Auto Label PR
39-
uses: actions/github-script@v7.0.1
39+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
4040
env:
4141
PR_NUMBER: ${{ github.event.inputs.pr_number || github.event.number }}
4242
with:

.github/workflows/component-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Comment
2121
id: create-comment
22-
uses: actions/github-script@v7.0.1
22+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2323
with:
2424
script: |
2525
const result = await github.rest.issues.createComment({
@@ -45,19 +45,19 @@ jobs:
4545
needs: prepare
4646
steps:
4747
- name: Generate
48-
uses: esphome/component-image-generator@v1.0.0
48+
uses: esphome/component-image-generator@d0d2a195b500e8c37c17f299ff6b90933f2197cf # v1.0.0
4949
with:
5050
component: ${{ needs.prepare.outputs.name }}
5151

5252
- name: Upload
53-
uses: actions/upload-artifact@v4.6.2
53+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5454
id: upload-artifact
5555
with:
5656
name: ${{ needs.prepare.outputs.name }}
5757
path: ${{ needs.prepare.outputs.name_lower }}.svg
5858

5959
- name: Update Comment
60-
uses: actions/github-script@v7.0.1
60+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
6161
with:
6262
script: |
6363
await github.rest.issues.updateComment({

.github/workflows/docker.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ on:
66
branches:
77
- current
88
paths:
9-
- requirements.txt
109
- Dockerfile
1110
- .github/workflows/docker.yml
1211
pull_request:
1312
paths:
14-
- requirements.txt
1513
- Dockerfile
1614
- .github/workflows/docker.yml
1715

@@ -25,36 +23,36 @@ jobs:
2523
steps:
2624
-
2725
name: Install pagefind
28-
uses: jaxxstorm/action-install-gh-release@v2.1.0
26+
uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0
2927
with:
3028
repo: cloudcannon/pagefind
3129
-
3230
name: Checkout source code
33-
uses: actions/checkout@v4.2.2
31+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3432
-
3533
name: Set up QEMU
36-
uses: docker/setup-qemu-action@v3
34+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
3735
-
3836
name: Set up Docker Buildx
39-
uses: docker/setup-buildx-action@v3
37+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
4038
-
4139
name: Login to DockerHub
4240
if: github.event_name != 'pull_request'
43-
uses: docker/login-action@v3
41+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3
4442
with:
4543
username: ${{ secrets.DOCKER_USER }}
4644
password: ${{ secrets.DOCKER_PASSWORD }}
4745
- name: Login to GitHub Container Registry
4846
if: github.event_name != 'pull_request'
49-
uses: docker/login-action@v3
47+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3
5048
with:
5149
registry: ghcr.io
5250
username: ${{ github.repository_owner }}
5351
password: ${{ secrets.GITHUB_TOKEN }}
5452
-
5553
name: Build and push
5654
id: docker_build
57-
uses: docker/build-push-action@v6
55+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
5856
with:
5957
context: .
6058
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/labeller-recheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
if: github.event.label.name == 'labeller-recheck'
1616
steps:
1717
- name: Call Auto Label workflow
18-
uses: actions/github-script@v7.0.1
18+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
1919
with:
2020
github-token: ${{ secrets.GITHUB_TOKEN }}
2121
script: |

.github/workflows/lint.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,23 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Install pagefind
23-
uses: jaxxstorm/action-install-gh-release@v2.1.0
23+
uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0
2424
with:
2525
repo: cloudcannon/pagefind
26-
- uses: actions/checkout@v4.2.2
26+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2727
- name: Set up Python 3.12
28-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
2929
with:
3030
python-version: 3.12
3131
- name: Install dependencies
32-
run: pip install -r requirements.txt -r requirements_test.txt
32+
run: pip install -r requirements_test.txt
3333
- name: Register problem matchers
3434
run: |
3535
echo "::add-matcher::.github/workflows/matchers/ci-custom.json"
36-
36+
- name: markdownlint-cli
37+
uses: nosborn/github-action-markdown-cli@508d6cefd8f0cc99eab5d2d4685b1d5f470042c1 # v3.5.0
38+
with:
39+
config_file: ".markdownlintrc"
40+
files: .
3741
- name: Lint
3842
run: python lint.py
39-
- name: html-strict
40-
run: make html-strict

.github/workflows/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
lock:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: dessant/lock-threads@v4
19+
- uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v4
2020
with:
2121
pr-inactive-days: "1"
2222
pr-lock-reason: ""

.github/workflows/stale.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
stale:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/stale@v8
19+
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10
2020
with:
2121
days-before-pr-stale: 60
2222
days-before-pr-close: 7
@@ -30,19 +30,3 @@ jobs:
3030
pull request has been automatically marked as stale because of that
3131
and will be closed if no further activity occurs within 7 days.
3232
Thank you for your contributions.
33-
34-
# Use stale to automatically close issues with a reference to the issue tracker
35-
close-issues:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/stale@v8
39-
with:
40-
days-before-pr-stale: -1
41-
days-before-pr-close: -1
42-
days-before-issue-stale: 1
43-
days-before-issue-close: 1
44-
remove-stale-when-updated: true
45-
stale-issue-label: "stale"
46-
exempt-issue-labels: "not-stale"
47-
stale-issue-message: >
48-
https://github.com/esphome/esphome-docs/issues/162

0 commit comments

Comments
 (0)