Skip to content

Commit a70e999

Browse files
committed
chore: add mmwave
1 parent 7f82ee1 commit a70e999

File tree

3 files changed

+27
-58
lines changed

3 files changed

+27
-58
lines changed

.github/workflows/validate.yaml

Lines changed: 11 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616

1717
jobs:
1818
list-configs:
19-
name: Discover changed ESPHome configs
19+
name: Get Changed Configs Summary
2020
runs-on: ubuntu-latest
2121
outputs:
2222
configs: ${{ steps.collect.outputs.configs }}
@@ -111,25 +111,23 @@ jobs:
111111
let summaryText = '';
112112
113113
if (configs.length === 0) {
114-
summaryText += '## 🔍 ESPHome Configuration Validation\n\n';
115-
summaryText += '### ℹ️ No ESPHome configs to validate\n\n';
114+
summaryText += 'No ESPHome configs to validate\n\n';
116115
if (changedFiles.length > 0) {
117-
summaryText += `**Changed files:** ${changedFiles.length}\n`;
118-
summaryText += `**ESPHome configs:** 0\n\n`;
116+
summaryText += `Changed files: ${changedFiles.length}\n`;
117+
summaryText += `ESPHome configs: 0\n\n`;
119118
}
120119
} else {
121-
const configList = configs.map(config => `- **${config.friendly_name}** (\`${config.file}\`)`);
122-
123-
summaryText += '## 🔍 ESPHome Configuration Validation\n\n';
124-
summaryText += '### 📋 Configs to validate:\n\n';
125-
summaryText += configList.join('\n') + '\n\n';
126-
summaryText += `**Total configs:** ${configs.length}\n\n`;
120+
summaryText += 'Configs to test:\n';
121+
configs.forEach(config => {
122+
summaryText += `- ${config.friendly_name} ('${config.file}')\n`;
123+
});
124+
summaryText += '\n';
127125
}
128126
129127
if (skippedFiles.length > 0) {
130-
summaryText += '### ⚠️ Skipped files (not ESPHome configs):\n\n';
128+
summaryText += 'Skipped files (not ESPHome configs):\n';
131129
skippedFiles.forEach(file => {
132-
summaryText += `- \`${file}\` (no friendly_name found)\n`;
130+
summaryText += `- ${file} (no friendly_name found)\n`;
133131
core.warning(`File ${file} appears to be a YAML file but doesn't contain a friendly_name - skipping validation`);
134132
});
135133
summaryText += '\n';
@@ -174,27 +172,6 @@ jobs:
174172
set -o pipefail
175173
esphome config "${{ matrix.config.file }}" 2>&1 | tee esphome.log
176174
177-
- name: Save resolved config
178-
if: success()
179-
run: |
180-
esphome config "${{ matrix.config.file }}" > resolved-config.txt
181-
182-
- name: Upload log
183-
if: always()
184-
uses: actions/upload-artifact@v4
185-
with:
186-
name: esphome-log-${{ matrix.config.friendly_name }}
187-
path: esphome.log
188-
if-no-files-found: ignore
189-
190-
- name: Upload resolved config
191-
if: success()
192-
uses: actions/upload-artifact@v4
193-
with:
194-
name: esphome-config-${{ matrix.config.friendly_name }}
195-
path: resolved-config.txt
196-
if-no-files-found: ignore
197-
198175
- name: Add result to summary
199176
if: always()
200177
uses: actions/github-script@v7
@@ -204,38 +181,15 @@ jobs:
204181
JOB_STATUS: ${{ job.status }}
205182
with:
206183
script: |-
207-
const fs = require('fs');
208184
const {
209185
CONFIG_NAME,
210186
CONFIG_FILE,
211187
JOB_STATUS,
212-
GITHUB_SERVER_URL,
213-
GITHUB_REPOSITORY,
214-
GITHUB_RUN_ID,
215188
} = process.env;
216189
217190
const ok = JOB_STATUS === 'success';
218191
const icon = ok ? '✅' : '❌';
219192
220193
let summary = `${icon} ${CONFIG_NAME} (\`${CONFIG_FILE}\`) - ${JOB_STATUS}\n\n`;
221194
222-
if (!ok) {
223-
try {
224-
const lines = fs.readFileSync('esphome.log', 'utf8').split('\n');
225-
const tail = lines.slice(-40).join('\n');
226-
summary += 'Last lines of log:\n\n';
227-
summary += '```text\n' + tail + '\n```\n\n';
228-
} catch (err) {
229-
core.warning(`Could not read esphome.log: ${err.message}`);
230-
}
231-
}
232-
233-
const runUrl = `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}`;
234-
summary += `[View full logs for this run](${runUrl})\n\n`;
235-
summary += `Artifacts:\n`;
236-
summary += `- \`esphome-log-${CONFIG_NAME}\` (full log)\n`;
237-
if (ok) {
238-
summary += `- \`esphome-config-${CONFIG_NAME}\` (resolved/validated config)\n`;
239-
}
240-
241195
core.summary.addRaw(summary).write();

attic-mmwave.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
substitutions:
3+
system_name: attic-mmwave
4+
friendly_name: Attic MMWave
5+
device_description: Test
6+
7+
packages:
8+
device: !include
9+
file: esp32/base.yaml
10+
ld2450_base: github://EverythingSmartHome/everything-presence-lite/common/ld2450-base.yaml@main
11+
12+
esphome:
13+
project: # Spoof needed to use everythingsmarthome/everything-presence-mmwave-configurator
14+
name: EverythingSmartTechnology.Everything Presence Lite
15+
version: "1.4.1"

coop-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
substitutions:
33
system_name: coop-controller
4-
friendly_name: "Coop Controller"
4+
friendly_name: Coop Controller
55
device_description: wESP32-based coop door controller
66

77
packages:

0 commit comments

Comments
 (0)