Skip to content

Commit 69fc998

Browse files
author
Manoel Amaro
committed
Merge remote-tracking branch 'upstream/next' into feature/lvgl-groups
2 parents c90383b + 94bdd13 commit 69fc998

File tree

2,862 files changed

+144806
-135603
lines changed

Some content is hidden

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

2,862 files changed

+144806
-135603
lines changed

.claude/instructions.md

Lines changed: 255 additions & 75 deletions
Large diffs are not rendered by default.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: pr-workflow
3+
description: Create pull requests for esphome-docs. Use when creating PRs, submitting changes, or preparing contributions.
4+
allowed-tools: Read, Bash, Glob, Grep
5+
---
6+
7+
# ESPHome Docs PR Workflow
8+
9+
When creating a pull request for esphome-docs, follow these steps:
10+
11+
## 1. Create Branch from Upstream
12+
13+
Always base your branch on **upstream** (not origin/fork) to ensure you have the latest code:
14+
15+
```bash
16+
git fetch upstream
17+
git checkout -b <branch-name> upstream/current
18+
```
19+
20+
Use `upstream/current` for documentation fixes, or `upstream/next` for new component docs.
21+
22+
## 2. Read the PR Template
23+
24+
Before creating a PR, read `.github/PULL_REQUEST_TEMPLATE.md` to understand required fields.
25+
26+
## 3. Create the PR
27+
28+
Use `gh pr create` with the **full template** filled in. Never skip or abbreviate sections.
29+
30+
Required fields:
31+
- **Description**: What changes are being made
32+
- **Related issue**: Use `fixes <link>` syntax if applicable
33+
- **Pull request in esphome**: Link if this documents a new feature
34+
- **Checklist**: Check the appropriate boxes:
35+
- `next` branch: New docs with matching esphome PR
36+
- `current` branch: Fixes/adjustments to existing docs
37+
- Component index: Check if link added to `/components/_index.md`
38+
39+
## 4. Example PR Body
40+
41+
```markdown
42+
## Description:
43+
44+
<describe your changes here>
45+
46+
**Related issue (if applicable):** fixes https://github.com/esphome/esphome-docs/issues/XXX
47+
48+
**Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):**
49+
50+
- N/A (or esphome/esphome#XXX)
51+
52+
## Checklist:
53+
54+
- [ ] I am merging into `next` because this is new documentation that has a matching pull-request in [esphome](https://github.com/esphome/esphome) as linked above.
55+
or
56+
- [x] I am merging into `current` because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.
57+
58+
- [ ] Link added in `/components/_index.md` when creating new documents for new components or cookbook.
59+
```
60+
61+
## 5. Push and Create PR
62+
63+
```bash
64+
git push -u origin <branch-name>
65+
gh pr create --repo esphome/esphome-docs --base current --title "[component] Brief description"
66+
```
67+
68+
Use `--base next` if documenting a new feature with a matching esphome PR.

.devcontainer/devcontainer.json

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/typescript-node
13
{
2-
"name": "ESPHome - docs",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.13",
4-
"postCreateCommand": ".devcontainer/postCreate.sh",
5-
"postAttachCommand": "make live-html",
4+
"name": "ESPHome Astro Dev Container",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:22-bookworm",
66
"forwardPorts": [
7-
8000
7+
4321
88
],
9-
"features": {
10-
"ghcr.io/devcontainers/features/github-cli:1": {}
9+
"portsAttributes": {
10+
"4321": {
11+
"label": "Preview"
12+
}
1113
},
14+
// Add the IDs of extensions you want installed when the container is created.
1215
"customizations": {
1316
"vscode": {
1417
"extensions": [
15-
"ms-python.python"
16-
]
18+
"astro-build.astro-vscode",
19+
"vunguyentuan.vscode-css-variables",
20+
"esbenp.prettier-vscode",
21+
"yzhang.markdown-all-in-one",
22+
"davidanson.vscode-markdownlint",
23+
"jock.svg"
24+
],
25+
"settings": {
26+
"files.eol": "\n",
27+
"editor.tabSize": 2,
28+
"editor.formatOnPaste": false,
29+
"editor.formatOnSave": true,
30+
"editor.formatOnType": true,
31+
"[typescript]": {
32+
"editor.defaultFormatter": "esbenp.prettier-vscode"
33+
},
34+
"[javascript]": {
35+
"editor.defaultFormatter": "esbenp.prettier-vscode"
36+
},
37+
"files.trimTrailingWhitespace": true
38+
}
1739
}
18-
}
40+
},
41+
"postCreateCommand": "npm install",
42+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
43+
"remoteUser": "node"
44+
// moved settings under customizations.vscode.settings
1945
}

.devcontainer/postCreate.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
*.mp3 binary
88
*.gif binary
99
*.avif binary
10+
*.webp binary

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
## Description:
1+
<!-- markdownlint-disable -->
22

3+
## Description
34

45
**Related issue (if applicable):** fixes <link to issue>
56

6-
**Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):**
7+
**Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):**
78

89
- esphome/esphome#<esphome PR number goes here>
910

10-
## Checklist:
11+
## Checklist
1112

12-
- [ ] I am merging into `next` because this is new documentation that has a matching pull-request in [esphome](https://github.com/esphome/esphome) as linked above.
13-
or
14-
- [ ] I am merging into `current` because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.
13+
- [ ] I am merging into `next` because this is new documentation that has a matching pull-request in [esphome](https://github.com/esphome/esphome) as linked above.
14+
or
15+
- [ ] I am merging into `current` because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.
1516

16-
- [ ] Link added in `/components/_index.md` when creating new documents for new components or cookbook.
17+
- [ ] Link added in `/src/content/docs/components/index.mdx` when creating new documents for new components or cookbook.
1718

1819
<details>
1920
<summary><strong>New Component Images</strong></summary>
@@ -30,13 +31,16 @@ If you are adding a new component to ESPHome, you can automatically generate a s
3031

3132
2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.
3233

33-
3. Extract the SVG file and place it in the `/static/images/` folder of this repository.
34+
3. Extract the SVG file and place it in the `/public/images/` folder of this repository.
3435

35-
4. Use the image in your component's index table entry in `/components/_index.md`.
36+
4. Use the image in your component's index table entry in `/src/content/docs/components/index.mdx`.
3637

3738
**Example:** For a component called "DHT22 Temperature Sensor", use:
39+
3840
```
3941
@esphomebot generate image dht22
4042
```
4143

44+
**Note:** All images used in ImgTable components must be placed in `/public/images/` as the component resolves them to absolute paths.
45+
4246
</details>

.github/copilot-instructions.md

Lines changed: 111 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,138 @@ Adhering to these guidelines will promote consistency and content quality.
55

66
## Project Overview & Purpose
77

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.
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.
1414

1515
## Core Technologies & Stack
1616

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
17+
- **Languages:** TypeScript, MDX (Markdown with JSX), CSS, JavaScript
18+
- **Frameworks & Runtimes:** Astro, Starlight, Node.js
19+
- **Key Libraries/Dependencies:**
20+
- **Astro:** Static site generator with component-based architecture
21+
- **Starlight:** Documentation framework built on Astro
22+
- **Pagefind:** Client-side text searching
23+
- **KaTeX:** Mathematical equation rendering
24+
- **remark-github-blockquote-alert:** GitHub-flavored alert boxes
2225

2326
## Architectural Patterns
2427

25-
See the README.md file.
28+
See the README.md file for detailed information about:
29+
30+
- Project structure (Astro/Starlight conventions)
31+
- Image handling (local imports vs. absolute paths)
32+
- MDX format and component usage
33+
- Custom Astro components
34+
35+
## Content Format
36+
37+
- **File Format:** MDX (`.mdx` files in `src/content/docs/`)
38+
- **Frontmatter:** Required YAML frontmatter with `title` and `description`
39+
- **Images:**
40+
- Single-use images: Import locally from `./images/` directory
41+
- Multi-use images: Use absolute paths from `/public/images/`
42+
- ImgTable images: Must be in `/public/images/`
43+
- **Components:** Import Astro components using `@components/` alias
2644

2745
## Branches
2846

29-
* **Current**
47+
- **Current**
3048
The `current` branch represents the published documentation in sync with the latest ESPHome release.
3149
PRs may be raised against this where they contain documentation revisions only.
32-
* **Next**
50+
- **Next**
3351
The `next` branch is where changes are made via PR corresponding to new features in the ESPHome code repo
3452
(esphome/esphome). When a release is made this branch is merged into current.
3553

3654
## Development & Testing Workflow
3755

3856
See the README.md file
3957

58+
Quick start:
59+
60+
1. Install dependencies: `npm install`
61+
1. Run dev server: `npm run dev`
62+
1. View at: `http://localhost:4321/`
63+
4064
## 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.
4765

48-
## Guidelines for AI generated reviews and PR summaries
66+
1. **Fork:** Fork the repository.
67+
1. **Branch:** Create a new branch in your fork from the appropriate base branch (`current` or `next`.)
68+
1. **Make Changes:** Adhere to all coding conventions and patterns.
69+
1. **Test:** Use `npm run dev` to run the development server for instant preview.
70+
1. **Commit:** Commit your changes. There is no strict format for commit messages.
71+
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.
72+
73+
## MDX Writing Guidelines
74+
75+
### Images
76+
77+
**Single-use images (used in one file only):**
78+
79+
```mdx
80+
import { Image } from 'astro:assets';
81+
import myImageImg from './images/my-image.jpg';
82+
83+
<Image src={myImageImg} alt="Description" layout="constrained" />
84+
```
85+
86+
**Multi-use images (used in multiple files):**
87+
88+
```mdx
89+
<Image src="/images/shared-image.jpg" alt="Description" layout="constrained" />
90+
```
91+
92+
**Important:** All images used in ImgTable components MUST be in `/public/images/` with absolute paths.
93+
94+
### Alert Boxes
95+
96+
Use GitHub-flavored alert syntax:
4997

50-
Avoid the use of flowery language and weasel-words that add no useful content; Keep comments concise and technically
98+
```markdown
99+
> [!NOTE]
100+
> Important information
101+
102+
> [!WARNING]
103+
> Warning message
104+
105+
> [!TIP]
106+
> Helpful tip
107+
```
108+
109+
### Components
110+
111+
Import custom components:
112+
113+
```mdx
114+
import APIRef from '@components/APIRef.astro';
115+
import Figure from '@components/Figure.astro';
116+
import myImageImg from './images/my-image.jpg';
117+
118+
<APIRef text="component.h" path="component/component.h" />
119+
120+
<Figure src={myImageImg} alt="Description" caption="Optional caption" />
121+
```
122+
123+
### Mathematical Expressions
124+
125+
Use LaTeX syntax with KaTeX:
126+
127+
```markdown
128+
Inline: $E = mc^2$
129+
130+
Block:
131+
$$
132+
\text{formula} = \frac{a}{b}
133+
$$
134+
```
135+
136+
## Guidelines for AI Generated Reviews and PR Summaries
137+
138+
Avoid the use of flowery language and weasel-words that add no useful content. Keep comments concise and technically
51139
accurate - you are not writing a press release.
140+
52141
For example instead of "Created comprehensive documentation with configuration examples and setup instructions"
53142
it is sufficient to say "Created documentation with examples and instructions".
54-
55-

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ updates:
55
schedule:
66
interval: daily
77
open-pull-requests-limit: 10
8-
- package-ecosystem: pip
8+
- package-ecosystem: npm
99
directory: "/"
1010
schedule:
1111
interval: daily

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
if: github.event.action != 'labeled' || github.event.sender.type != 'Bot'
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3030

3131
- name: Generate a token
3232
id: generate-token

0 commit comments

Comments
 (0)