-
Notifications
You must be signed in to change notification settings - Fork 0
Create CI #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Create CI #1
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Validate ESPHome boards | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| lint-and-compile: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install tools | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install esphome yamllint | ||
|
|
||
| - name: Lint YAML | ||
| run: yamllint . | ||
|
|
||
| - name: Validate config files | ||
| run: esphome config boards/*/demo.yaml | ||
|
|
||
| - name: Compile demos | ||
| env: | ||
| PLATFORMIO_BUILD_CACHE_DIR: /tmp/esphome_cache_${{ github.run_id }} | ||
| run: esphome compile boards/*/demo.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,20 +1,18 @@ | ||||||
| # ESPHomeCollection | ||||||
|
|
||||||
| This repository is where I share reusable ESPHome YAML definitions for various | ||||||
| boards and dev kits I acquire, to make it easier for others to use those boards. | ||||||
| Reusable, hardware-only ESPHome board definitions with simple demos. Keep hardware definition minimal and separate from application logic so users can compose clean projects. | ||||||
|
|
||||||
| ## Core Principle | ||||||
| ## Available Boards | ||||||
|
|
||||||
| My board definitions are clean, only defining the hardware. That allows you to | ||||||
| focus on the application logic. This separation of hardware and application | ||||||
| makes the code reusable and composable. | ||||||
| All board configurations are in the [`boards` directory](./boards/). Each board will be in a `boards/<board-slug>/` directory, with at least: | ||||||
|
|
||||||
| ## Available Boards | ||||||
| * `board.yaml`: the hardware definition. No application logic, automation, api or wifi provisioning. | ||||||
| * `demo.yaml`: a simple firmware that illustrates and exercises the board components. | ||||||
|
|
||||||
| The board slug is lowercase, hyphenated (e.g., `esp32-s3-box-3`, `esp32-c3-devkitm-1`). | ||||||
|
|
||||||
| You can find all board configurations in the [`boards` directory](./boards/). Each board has a | ||||||
| `board.yaml` for the hardware definition and a `demo.yaml` for a sample application. | ||||||
|
|
||||||
| ## Using a Board Definition in Your Project | ||||||
| ## Usage | ||||||
|
|
||||||
| To use a board definition in your own project, include them as a package like this: | ||||||
|
|
||||||
|
|
@@ -25,7 +23,10 @@ packages: | |||||
|
|
||||||
| Replace `esp32-s3-box-3` with the directory name of the board you want to use. | ||||||
|
|
||||||
| See [ESPHome Packages] for how package imports work. | ||||||
| It's recommended to replace `@main` with a specific commit, in order to avoid breakages | ||||||
| from possibly backwards-imcompatible changes. | ||||||
|
|
||||||
| See [ESPHome Packages] for details on how package imports work. | ||||||
|
|
||||||
| [ESPHome Packages]: https://esphome.io/components/packages.html | ||||||
|
|
||||||
|
|
@@ -41,6 +42,7 @@ esphome run ./boards/${BOARD}/demo.yaml | |||||
| If you don't want to explicitly clone the repository, create a local file (e.g. `demo.yaml`), where the entire content is the import of the demo: | ||||||
|
|
||||||
| ```yaml | ||||||
| # demo.yaml | ||||||
| packages: | ||||||
| board: github://fortuna/ESPHomeCollection/boards/esp32-s3-box-3/demo.yaml@main | ||||||
| ``` | ||||||
|
|
@@ -55,38 +57,99 @@ esphome run ./demo.yaml | |||||
|
|
||||||
| ## Development | ||||||
|
|
||||||
| You need to install the `esphome` and `yamllint` Python binaries. | ||||||
| Contributions of new boards are welcome. | ||||||
|
|
||||||
| On macOS, if you have Homebrew installed, you can use: | ||||||
| ### Install the tooling | ||||||
|
|
||||||
| ```sh | ||||||
| brew install esphome yamllint | ||||||
| pip install esphome yamllint | ||||||
| ``` | ||||||
|
|
||||||
| On other platforms, it may be easier to use `pipx run`, but you need `pipx` installed. | ||||||
| You may need to use `pip3` or `pipx` depending on your system. | ||||||
|
|
||||||
| To quickly validate a config, use `esphome config`. For example: | ||||||
| On macOS, if you have [Homebrew installed](https://brew.sh/), use: | ||||||
|
|
||||||
| ```sh | ||||||
| esphome config boards/esp32-s3-box-3/demo.yaml | ||||||
| brew install esphome yamllint | ||||||
| ``` | ||||||
|
|
||||||
| You must run `esphome config` on the demo files, because the board definitions are incomplete ESPHome configs and will fail validation. | ||||||
| ### Add a new board | ||||||
|
|
||||||
| 1. **Create folder**: `boards/<board-slug>/`, where `<oard-slug>` is lowercase, hyphenated (e.g., `esp32-s3-box-3`, `esp32-c3-devkitm-1`). | ||||||
|
||||||
| 1. **Create folder**: `boards/<board-slug>/`, where `<oard-slug>` is lowercase, hyphenated (e.g., `esp32-s3-box-3`, `esp32-c3-devkitm-1`). | |
| 1. **Create folder**: `boards/<board-slug>/`, where `<board-slug>` is lowercase, hyphenated (e.g., `esp32-s3-box-3`, `esp32-c3-devkitm-1`). |
Copilot
AI
Aug 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a spelling error: 'harware' should be 'hardware'.
Suggested change
| * Define all the harware components (pins, buses, sensors, displays, audio, etc) | |
| * Define all the hardware components (pins, buses, sensors, displays, audio, etc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a spelling error: 'imcompatible' should be 'incompatible'.