esphome-device-builder-frontend 0.1.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. esphome_device_builder_frontend-0.1.19/LICENSE +176 -0
  2. esphome_device_builder_frontend-0.1.19/MANIFEST.in +5 -0
  3. esphome_device_builder_frontend-0.1.19/PKG-INFO +156 -0
  4. esphome_device_builder_frontend-0.1.19/README.md +135 -0
  5. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/493.977c2f290ff4d281.js +132 -0
  6. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/577.75cdcb9969bddb46.js +2 -0
  7. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/795.5ff2dac25bb86ae0.js +2 -0
  8. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/811.d2d3d3f70a9f60e5.js +15 -0
  9. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/816.8f228082b56dc46d.js +4233 -0
  10. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/__init__.py +12 -0
  11. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/app.d461ddf07955a032.js +12513 -0
  12. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/app.d461ddf07955a032.js.LICENSE.txt +61 -0
  13. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/assets/board/default.svg +31 -0
  14. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/assets/logo/esphome.svg +4 -0
  15. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/assets/logo/ha.svg +3 -0
  16. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/index.html +23 -0
  17. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/vendors.4994264b607ee6d1.js +201 -0
  18. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend/vendors.4994264b607ee6d1.js.LICENSE.txt +1 -0
  19. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend.egg-info/PKG-INFO +156 -0
  20. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend.egg-info/SOURCES.txt +23 -0
  21. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend.egg-info/dependency_links.txt +1 -0
  22. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend.egg-info/not-zip-safe +1 -0
  23. esphome_device_builder_frontend-0.1.19/esphome_device_builder_frontend.egg-info/top_level.txt +1 -0
  24. esphome_device_builder_frontend-0.1.19/pyproject.toml +44 -0
  25. esphome_device_builder_frontend-0.1.19/setup.cfg +4 -0
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,5 @@
1
+ include README.md
2
+ include LICENSE
3
+ graft esphome_device_builder_frontend
4
+ recursive-exclude * *.py[co]
5
+ recursive-exclude * *.map
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: esphome-device-builder-frontend
3
+ Version: 0.1.19
4
+ Summary: Prebuilt web frontend for the ESPHome Device Builder Dashboard
5
+ Author-email: The ESPHome Authors <esphome@openhomefoundation.org>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/esphome/device-builder-dashboard-frontend
8
+ Project-URL: Issues, https://github.com/esphome/device-builder-dashboard-backend/issues
9
+ Project-URL: Repository, https://github.com/esphome/device-builder-dashboard-frontend
10
+ Platform: any
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Home Automation
17
+ Requires-Python: >=3.12
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Dynamic: license-file
21
+
22
+ # ESPHome Device Builder Dashboard — Frontend
23
+
24
+ A web-based dashboard for managing, configuring, and deploying ESPHome IoT device firmware. Built with Lit web components and TypeScript.
25
+
26
+ > **This repository contains the frontend source only.** The dashboard runs as part of the **[ESPHome Device Builder Dashboard](https://github.com/esphome/device-builder)**, which ships a prebuilt copy of this frontend bundled in. End users should follow the install / run instructions in the backend repo — there's nothing to deploy from here on its own.
27
+
28
+ ## Screenshots
29
+
30
+ Configured devices in the table view, with the discovered-devices banner above:
31
+
32
+ ![Dashboard table view](docs/screenshots/dashboard-table.png)
33
+
34
+ Discovered devices expanded — each card surfaces the project metadata and offers a one-click "Take control" adoption flow:
35
+
36
+ ![Discovered devices ready to adopt](docs/screenshots/dashboard-discovered.png)
37
+
38
+ Create-device wizard's board picker — searchable, filterable by chip family, with curated featured boards up front:
39
+
40
+ ![Board picker in the create-device wizard](docs/screenshots/wizard-board-picker.png)
41
+
42
+ ## Tech stack
43
+
44
+ - **[Lit](https://lit.dev/)** — Web components framework
45
+ - **TypeScript** — Strict mode throughout
46
+ - **[Rspack](https://rspack.dev/)** — Rust-based bundler
47
+ - **[Web Awesome](https://www.webawesome.com/)** — UI component library (Home Assistant variant)
48
+ - **[CodeMirror](https://codemirror.net/)** — YAML editor with syntax highlighting
49
+ - **[Sonner](https://sonner.emilkowal.dev/)** — Toast notifications
50
+
51
+ ## Backlog
52
+
53
+ Before filing anything, take a look at the **[shared backlog](https://github.com/orgs/esphome/projects/7/views/1?filterQuery=project%3A%22device-builder-dashboard%22)** — it lists everything that's already planned, in progress, or shipped for the dashboard. Saves duplicates and gives you a feel for where the project is heading.
54
+
55
+ ## Issues and feature requests
56
+
57
+ The new-issue chooser on this repo only surfaces redirect links — there's no way to file a generic issue here.
58
+
59
+ - **🐛 Bugs** → [backend issue tracker](https://github.com/esphome/device-builder/issues). UI bugs go there too so we can triage everything in one place.
60
+ - **💡 Feature ideas** → [ESPHome org discussions](https://github.com/orgs/esphome/discussions) or the [dashboard Discord channel](https://discord.gg/Rf2jWGVjaK) where the new UI is actively discussed and feedback is being collected. Once a request is shaped enough to be actionable a maintainer adds it to the backlog above.
61
+
62
+ ## Contributing — local development
63
+
64
+ The rest of this README is for developers working on the frontend itself. If you just want to run the dashboard, head over to the [backend repo](https://github.com/esphome/device-builder) and follow its setup.
65
+
66
+ ### Prerequisites
67
+
68
+ - Node.js 22+ (with npm)
69
+ - A running ESPHome Device builder backend on `localhost:6052` — clone and run [device-builder](https://github.com/esphome/device-builder) in dev mode in a separate terminal
70
+
71
+ ### Install
72
+
73
+ ```bash
74
+ npm install
75
+ ```
76
+
77
+ ### Dev server
78
+
79
+ ```bash
80
+ npm run dev
81
+ ```
82
+
83
+ Starts an HMR dev server at `http://localhost:5173`. WebSocket and REST traffic are proxied to the backend at `localhost:6052`.
84
+
85
+ ### Production build
86
+
87
+ ```bash
88
+ npm run build
89
+ ```
90
+
91
+ Outputs the bundled assets into `esphome_device_builder_frontend/` — that directory doubles as the Python package source for the wheel that ships with the backend release. The `__init__.py` exposing the asset path is sourced from `public/__init__.py` and copied into place by the bundler.
92
+
93
+ To produce the wheel locally (matches what CI builds on release):
94
+
95
+ ```bash
96
+ npm run build
97
+ python3 -m build --wheel
98
+ # wheel ends up in dist/
99
+ ```
100
+
101
+ ### Other scripts
102
+
103
+ | Script | Description |
104
+ | ---------------- | ------------------------------------------ |
105
+ | `npm run lint` | TypeScript type-check (`tsc --noEmit`) |
106
+ | `npm test` | Run the Vitest suite once |
107
+ | `npm run test:watch` | Run tests in watch mode |
108
+ | `npm run format` | Format `src/` with Prettier |
109
+
110
+ ## Project structure
111
+
112
+ ```
113
+ src/
114
+ ├── api/ # WebSocket/HTTP API client and types
115
+ ├── components/ # Lit web components
116
+ │ ├── device/ # Device editor, navigator, component catalog
117
+ │ └── wizard/ # Device creation wizard steps
118
+ ├── pages/ # Routed page components (dashboard, device, secrets)
119
+ ├── context/ # Lit Context definitions
120
+ ├── common/ # i18n / localization
121
+ ├── util/ # Helpers (debounce, YAML parsing, icons, ...)
122
+ ├── styles/ # Theme and shared styles
123
+ ├── translations/ # Language files (en, fr, nl)
124
+ └── entrypoint.ts # App bootstrap
125
+
126
+ public/
127
+ ├── __init__.py # Python package entry — copied into the build
128
+ │ # output at bundle time so the wheel exposes a
129
+ │ # `where()` helper pointing at the static assets.
130
+ ├── index.html # HTML shell
131
+ └── static/ # Static assets (favicons, ...)
132
+
133
+ esphome_device_builder_frontend/ # Build output (gitignored)
134
+ ```
135
+
136
+ ## Releases
137
+
138
+ Releases are produced by GitHub Actions:
139
+
140
+ - `release.yml` — manual trigger (or called from `auto-release.yml`). Tags the version, drafts release notes from PR labels, builds the Python wheel, attaches it to the GitHub release, then opens or updates a single bump PR on the backend repo so it can pick up the new wheel URL.
141
+ - `auto-release.yml` — nightly cron that auto-releases when ≥ 2 commits have landed since the last release.
142
+ - `dependabot.yml` + `auto-approve-dependabot.yml` — weekly npm + Actions bumps with auto-approve.
143
+
144
+ The backend's `pyproject.toml` references the wheel by GitHub release URL (no PyPI), so a release here is everything needed to ship a new dashboard build.
145
+
146
+ ## Status
147
+
148
+ ### Disabled features
149
+
150
+ The frontend is wired up for some features the backend doesn't expose yet. Anything in this list is gated behind a flag in [`src/feature-flags.ts`](src/feature-flags.ts) — flip the flag to re-enable once the backend lands.
151
+
152
+ - **Automations** (`AUTOMATIONS_ENABLED`) — the navigator's "Automations" group is still visible and lists existing automations parsed from the YAML, but the "+ Add automation" action button is greyed out (and the underlying dialog isn't mounted). The ESPHome WebSocket API doesn't yet expose the endpoints the UI needs to add new ones (catalog of triggers / conditions / actions, schema lookups, save-back hooks). Re-enable by setting `AUTOMATIONS_ENABLED = true` once those land.
153
+
154
+ ## License
155
+
156
+ Apache 2.0
@@ -0,0 +1,135 @@
1
+ # ESPHome Device Builder Dashboard — Frontend
2
+
3
+ A web-based dashboard for managing, configuring, and deploying ESPHome IoT device firmware. Built with Lit web components and TypeScript.
4
+
5
+ > **This repository contains the frontend source only.** The dashboard runs as part of the **[ESPHome Device Builder Dashboard](https://github.com/esphome/device-builder)**, which ships a prebuilt copy of this frontend bundled in. End users should follow the install / run instructions in the backend repo — there's nothing to deploy from here on its own.
6
+
7
+ ## Screenshots
8
+
9
+ Configured devices in the table view, with the discovered-devices banner above:
10
+
11
+ ![Dashboard table view](docs/screenshots/dashboard-table.png)
12
+
13
+ Discovered devices expanded — each card surfaces the project metadata and offers a one-click "Take control" adoption flow:
14
+
15
+ ![Discovered devices ready to adopt](docs/screenshots/dashboard-discovered.png)
16
+
17
+ Create-device wizard's board picker — searchable, filterable by chip family, with curated featured boards up front:
18
+
19
+ ![Board picker in the create-device wizard](docs/screenshots/wizard-board-picker.png)
20
+
21
+ ## Tech stack
22
+
23
+ - **[Lit](https://lit.dev/)** — Web components framework
24
+ - **TypeScript** — Strict mode throughout
25
+ - **[Rspack](https://rspack.dev/)** — Rust-based bundler
26
+ - **[Web Awesome](https://www.webawesome.com/)** — UI component library (Home Assistant variant)
27
+ - **[CodeMirror](https://codemirror.net/)** — YAML editor with syntax highlighting
28
+ - **[Sonner](https://sonner.emilkowal.dev/)** — Toast notifications
29
+
30
+ ## Backlog
31
+
32
+ Before filing anything, take a look at the **[shared backlog](https://github.com/orgs/esphome/projects/7/views/1?filterQuery=project%3A%22device-builder-dashboard%22)** — it lists everything that's already planned, in progress, or shipped for the dashboard. Saves duplicates and gives you a feel for where the project is heading.
33
+
34
+ ## Issues and feature requests
35
+
36
+ The new-issue chooser on this repo only surfaces redirect links — there's no way to file a generic issue here.
37
+
38
+ - **🐛 Bugs** → [backend issue tracker](https://github.com/esphome/device-builder/issues). UI bugs go there too so we can triage everything in one place.
39
+ - **💡 Feature ideas** → [ESPHome org discussions](https://github.com/orgs/esphome/discussions) or the [dashboard Discord channel](https://discord.gg/Rf2jWGVjaK) where the new UI is actively discussed and feedback is being collected. Once a request is shaped enough to be actionable a maintainer adds it to the backlog above.
40
+
41
+ ## Contributing — local development
42
+
43
+ The rest of this README is for developers working on the frontend itself. If you just want to run the dashboard, head over to the [backend repo](https://github.com/esphome/device-builder) and follow its setup.
44
+
45
+ ### Prerequisites
46
+
47
+ - Node.js 22+ (with npm)
48
+ - A running ESPHome Device builder backend on `localhost:6052` — clone and run [device-builder](https://github.com/esphome/device-builder) in dev mode in a separate terminal
49
+
50
+ ### Install
51
+
52
+ ```bash
53
+ npm install
54
+ ```
55
+
56
+ ### Dev server
57
+
58
+ ```bash
59
+ npm run dev
60
+ ```
61
+
62
+ Starts an HMR dev server at `http://localhost:5173`. WebSocket and REST traffic are proxied to the backend at `localhost:6052`.
63
+
64
+ ### Production build
65
+
66
+ ```bash
67
+ npm run build
68
+ ```
69
+
70
+ Outputs the bundled assets into `esphome_device_builder_frontend/` — that directory doubles as the Python package source for the wheel that ships with the backend release. The `__init__.py` exposing the asset path is sourced from `public/__init__.py` and copied into place by the bundler.
71
+
72
+ To produce the wheel locally (matches what CI builds on release):
73
+
74
+ ```bash
75
+ npm run build
76
+ python3 -m build --wheel
77
+ # wheel ends up in dist/
78
+ ```
79
+
80
+ ### Other scripts
81
+
82
+ | Script | Description |
83
+ | ---------------- | ------------------------------------------ |
84
+ | `npm run lint` | TypeScript type-check (`tsc --noEmit`) |
85
+ | `npm test` | Run the Vitest suite once |
86
+ | `npm run test:watch` | Run tests in watch mode |
87
+ | `npm run format` | Format `src/` with Prettier |
88
+
89
+ ## Project structure
90
+
91
+ ```
92
+ src/
93
+ ├── api/ # WebSocket/HTTP API client and types
94
+ ├── components/ # Lit web components
95
+ │ ├── device/ # Device editor, navigator, component catalog
96
+ │ └── wizard/ # Device creation wizard steps
97
+ ├── pages/ # Routed page components (dashboard, device, secrets)
98
+ ├── context/ # Lit Context definitions
99
+ ├── common/ # i18n / localization
100
+ ├── util/ # Helpers (debounce, YAML parsing, icons, ...)
101
+ ├── styles/ # Theme and shared styles
102
+ ├── translations/ # Language files (en, fr, nl)
103
+ └── entrypoint.ts # App bootstrap
104
+
105
+ public/
106
+ ├── __init__.py # Python package entry — copied into the build
107
+ │ # output at bundle time so the wheel exposes a
108
+ │ # `where()` helper pointing at the static assets.
109
+ ├── index.html # HTML shell
110
+ └── static/ # Static assets (favicons, ...)
111
+
112
+ esphome_device_builder_frontend/ # Build output (gitignored)
113
+ ```
114
+
115
+ ## Releases
116
+
117
+ Releases are produced by GitHub Actions:
118
+
119
+ - `release.yml` — manual trigger (or called from `auto-release.yml`). Tags the version, drafts release notes from PR labels, builds the Python wheel, attaches it to the GitHub release, then opens or updates a single bump PR on the backend repo so it can pick up the new wheel URL.
120
+ - `auto-release.yml` — nightly cron that auto-releases when ≥ 2 commits have landed since the last release.
121
+ - `dependabot.yml` + `auto-approve-dependabot.yml` — weekly npm + Actions bumps with auto-approve.
122
+
123
+ The backend's `pyproject.toml` references the wheel by GitHub release URL (no PyPI), so a release here is everything needed to ship a new dashboard build.
124
+
125
+ ## Status
126
+
127
+ ### Disabled features
128
+
129
+ The frontend is wired up for some features the backend doesn't expose yet. Anything in this list is gated behind a flag in [`src/feature-flags.ts`](src/feature-flags.ts) — flip the flag to re-enable once the backend lands.
130
+
131
+ - **Automations** (`AUTOMATIONS_ENABLED`) — the navigator's "Automations" group is still visible and lists existing automations parsed from the YAML, but the "+ Add automation" action button is greyed out (and the underlying dialog isn't mounted). The ESPHome WebSocket API doesn't yet expose the endpoints the UI needs to add new ones (catalog of triggers / conditions / actions, schema lookups, save-back hooks). Re-enable by setting `AUTOMATIONS_ENABLED = true` once those land.
132
+
133
+ ## License
134
+
135
+ Apache 2.0
@@ -0,0 +1,132 @@
1
+ "use strict";(globalThis.rspackChunkesphome_frontend=globalThis.rspackChunkesphome_frontend||[]).push([[493],{4148(e,a,t){t.r(a),t.d(a,{ESPHomePageSecrets:()=>v});var o=t(5172),r=t(9165),i=t(2009),s=t(3442),l=t(261),n=t(1556),c=t(3140),d=t(1093);function p(e,a,t,o){var r,i=arguments.length,s=i<3?a:null===o?o=Object.getOwnPropertyDescriptor(a,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,a,t,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(i<3?r(s):i>3?r(a,t,s):r(a,t))||s);return i>3&&s&&Object.defineProperty(a,t,s),s}t(3238),t(1062),t(2202),t(6117),t(2910),(0,d.C)({"arrow-left":r.mdiArrowLeft,"content-save":r.mdiContentSave});let h="secrets.yaml";class v extends i.WF{async connectedCallback(){super.connectedCallback();try{let e=await this._api.getConfig(h);this._yaml=e,this._savedYaml=e}catch{let e=this._localize("secrets.file_header");this._yaml=e,this._savedYaml=e}this._loaded=!0}render(){return(0,i.qy)`
2
+ <div class="page">
3
+ <div class="page-header">
4
+ <div class="back" @click=${this._goBack} title=${this._localize("layout.back")}>
5
+ <wa-icon library="mdi" name="arrow-left"></wa-icon>
6
+ </div>
7
+ <div class="page-title">
8
+ <h1>${this._localize("secrets.title")}</h1>
9
+ <p>${this._localize("secrets.desc")}</p>
10
+ </div>
11
+ </div>
12
+ <wa-divider></wa-divider>
13
+ <div class="editor-card">
14
+ <button
15
+ type="button"
16
+ class="save-button"
17
+ ?disabled=${this._saving||!this._loaded||this._yaml===this._savedYaml}
18
+ @click=${this._save}
19
+ >
20
+ <wa-icon library="mdi" name="content-save"></wa-icon>
21
+ ${this._saving?this._localize("secrets.saving"):this._localize("secrets.save")}
22
+ </button>
23
+ <esphome-yaml-editor
24
+ .value=${this._yaml}
25
+ @yaml-change=${e=>{this._yaml=e.detail.value}}
26
+ ></esphome-yaml-editor>
27
+ </div>
28
+ </div>
29
+ `}_goBack(){window.history.back()}_save(){this._savedYaml=this._yaml,l.A.success(this._localize("secrets.saved"),{richColors:!0}),this._api.updateConfig(h,this._yaml).catch(e=>{(e instanceof Error?e.message:"").includes("timed out")||l.A.error(this._localize("secrets.save_error"),{richColors:!0})})}constructor(...e){super(...e),this._localize=e=>e,this._yaml="",this._savedYaml="",this._saving=!1,this._loaded=!1}}v.styles=[c.G,(0,i.AH)`
30
+ :host {
31
+ display: flex;
32
+ flex-direction: column;
33
+ height: calc(100vh - var(--esphome-header-height));
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ .page {
38
+ flex: 1;
39
+ display: flex;
40
+ flex-direction: column;
41
+ padding: var(--wa-space-l);
42
+ gap: var(--wa-space-m);
43
+ overflow: hidden;
44
+ }
45
+
46
+ .page-header {
47
+ display: flex;
48
+ align-items: center;
49
+ gap: var(--wa-space-m);
50
+ flex-shrink: 0;
51
+ }
52
+
53
+ .page-title {
54
+ flex: 1;
55
+ }
56
+
57
+ .page-title h1 {
58
+ margin: 0 0 2px;
59
+ font-size: var(--wa-font-size-l);
60
+ font-weight: var(--wa-font-weight-bold);
61
+ color: var(--wa-color-text-normal);
62
+ }
63
+
64
+ .page-title p {
65
+ margin: 0;
66
+ font-size: var(--wa-font-size-s);
67
+ color: var(--wa-color-text-quiet);
68
+ }
69
+
70
+ .editor-card {
71
+ flex: 1;
72
+ position: relative;
73
+ background: var(--wa-color-surface-default);
74
+ border-radius: var(--wa-border-radius-l);
75
+ border: var(--wa-border-width-s) solid var(--wa-color-surface-border);
76
+ box-shadow: var(--wa-elevation-02);
77
+ display: flex;
78
+ flex-direction: column;
79
+ overflow: hidden;
80
+ }
81
+
82
+ .save-button {
83
+ position: absolute;
84
+ bottom: var(--wa-space-m);
85
+ right: var(--wa-space-m);
86
+ z-index: 10;
87
+ display: inline-flex;
88
+ align-items: center;
89
+ gap: 6px;
90
+ border: none;
91
+ background: var(--esphome-primary);
92
+ color: var(--esphome-on-primary);
93
+ padding: 8px 16px;
94
+ border-radius: var(--wa-border-radius-m);
95
+ cursor: pointer;
96
+ font-size: var(--wa-font-size-xs);
97
+ font-weight: var(--wa-font-weight-bold);
98
+ font-family: inherit;
99
+ box-shadow: 0 2px 8px color-mix(in srgb, var(--esphome-primary), transparent 50%);
100
+ transition: background 0.12s, box-shadow 0.12s, transform 0.12s;
101
+ }
102
+
103
+ .save-button:hover:not(:disabled) {
104
+ background: color-mix(in srgb, var(--esphome-primary), black 10%);
105
+ box-shadow: 0 4px 14px color-mix(in srgb, var(--esphome-primary), transparent 35%);
106
+ transform: translateY(-1px);
107
+ }
108
+
109
+ .save-button:active:not(:disabled) {
110
+ transform: translateY(0);
111
+ }
112
+
113
+ .save-button:disabled {
114
+ opacity: 0.4;
115
+ cursor: not-allowed;
116
+ box-shadow: none;
117
+ }
118
+
119
+ .save-button wa-icon {
120
+ font-size: 16px;
121
+ }
122
+
123
+ .back {
124
+ cursor: pointer;
125
+ }
126
+
127
+ .back wa-icon {
128
+ font-size: var(--wa-font-size-l);
129
+ color: var(--esphome-primary);
130
+ }
131
+ `],p([(0,o.Fg)({context:n.$F,subscribe:!0}),(0,s.wk)()],v.prototype,"_localize",void 0),p([(0,o.Fg)({context:n.Ie})],v.prototype,"_api",void 0),p([(0,s.wk)()],v.prototype,"_yaml",void 0),p([(0,s.wk)()],v.prototype,"_savedYaml",void 0),p([(0,s.wk)()],v.prototype,"_saving",void 0),p([(0,s.wk)()],v.prototype,"_loaded",void 0),v=p([(0,s.EM)("esphome-page-secrets")],v)}}]);
132
+ //# sourceMappingURL=493.977c2f290ff4d281.js.map