Skip to content

Commit 851a2bc

Browse files
Separate per-phase load data structures, update MQTT paths, and improve CI workflows.
1 parent 20ec34e commit 851a2bc

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

.github/workflows/addon.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
version: ${{ steps.version.outputs.version }}
1717
steps:
1818
- uses: actions/checkout@v6
19+
with:
20+
fetch-depth: 0 # full history for changelog generation
1921

2022
- name: Set version from tag
2123
id: version
@@ -28,11 +30,39 @@ jobs:
2830
version="${GITHUB_REF_NAME#v}"
2931
sed -i "s/^version:.*/version: ${version}/" ha-addon/config.yaml
3032
31-
- name: Commit version bump
33+
- name: Install Claude Code
34+
run: npm install -g @anthropic-ai/claude-code
35+
36+
- name: Generate changelog
37+
env:
38+
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
run: |
40+
VERSION="${GITHUB_REF_NAME#v}"
41+
PREV_TAG=$(git tag --sort=-version:refname | grep '^v' | sed -n '2p')
42+
43+
if [ -n "$PREV_TAG" ]; then
44+
git log --oneline "${PREV_TAG}..HEAD" > /tmp/commits.txt
45+
git diff "${PREV_TAG}..HEAD" --stat > /tmp/diffstat.txt
46+
else
47+
git log --oneline > /tmp/commits.txt
48+
echo "" > /tmp/diffstat.txt
49+
fi
50+
51+
claude -p --model claude-sonnet-4-6 --allowedTools Read,Edit \
52+
"Update ha-addon/CHANGELOG.md with a new ## ${VERSION} section after the '# Changelog' header.
53+
Read /tmp/commits.txt for the commits and /tmp/diffstat.txt for changed files.
54+
Read ha-addon/CHANGELOG.md first to match the existing style.
55+
Guidelines:
56+
- Concise, user-facing bullet points
57+
- Note breaking changes with **Breaking:**
58+
- Do not modify any other sections" \
59+
|| echo "::warning::Failed to generate changelog, skipping"
60+
61+
- name: Commit release
3262
run: |
3363
git config user.name "github-actions[bot]"
3464
git config user.email "github-actions[bot]@users.noreply.github.com"
35-
git add ha-addon/config.yaml
65+
git add ha-addon/config.yaml ha-addon/CHANGELOG.md
3666
git diff --cached --quiet || git commit -m "Release ${GITHUB_REF_NAME}: update add-on version"
3767
git push origin HEAD:master
3868

ha-addon/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 1.1.2
4+
5+
- Separate per-phase load data from grid data in snapshot structs
6+
- Per-phase load sensors now under `load.l1`/`load.l2`/`load.l3` (was `grid.l1`/`grid.l2`/`grid.l3`)
7+
- MQTT discovery paths updated: e.g. `load.l1.power` replaces `grid.l1.load_power`
8+
- **Breaking:** HA entities using old JSON paths will need re-discovery
9+
- Update GitHub Actions to Node.js 24 compatible versions
10+
- Fix Dockerfile `InvalidDefaultArgInFrom` lint warning
11+
312
## 1.1.1
413

514
- Auto-reconnect dropped dongle TCP connections instead of staying permanently disconnected

0 commit comments

Comments
 (0)