Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
include:
- arch: aarch64
platform: linux/arm64
base: ghcr.io/home-assistant/aarch64-base-python:3.13-alpine3.21
base: ghcr.io/home-assistant/aarch64-base-python:3.14-alpine3.23
- arch: amd64
platform: linux/amd64
base: ghcr.io/home-assistant/amd64-base-python:3.13-alpine3.21
base: ghcr.io/home-assistant/amd64-base-python:3.14-alpine3.23

steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ networking), but the integration can connect by manual configuration. On Linux,
```bash
# Build (use aarch64 base on Apple Silicon, amd64 on Intel/Linux)
docker build -f span_panel_simulator/Dockerfile \
--build-arg BUILD_FROM=ghcr.io/home-assistant/aarch64-base-python:3.13-alpine3.21 \
--build-arg BUILD_FROM=ghcr.io/home-assistant/aarch64-base-python:3.14-alpine3.23 \
-t span-panel-simulator:local .

# Run
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ dev = [
span-simulator = "span_panel_simulator.__main__:main"

[tool.hatch.build.targets.wheel]
# `packages` already ships every file under src/span_panel_simulator, including
# dashboard/templates and dashboard/static. A `force-include` table re-adding
# those two directories at the same destination paths made hatchling write each
# file twice; newer hatchling rejects that outright ("A second file is being
# added to the wheel archive at the same path"), breaking `pip install .` in the
# add-on Docker build. Build isolation resolves `hatchling` fresh on every build,
# so the older, tolerant version this was authored against is not coming back.
packages = ["src/span_panel_simulator"]

[tool.hatch.build.targets.wheel.force-include]
"src/span_panel_simulator/dashboard/templates" = "span_panel_simulator/dashboard/templates"
"src/span_panel_simulator/dashboard/static" = "span_panel_simulator/dashboard/static"

[tool.ruff]
# Pinned to py313 because ruff 0.15.x has a formatter bug under py314 that
# rewrites ``except (A, B):`` into the Python-2 ``except A, B:`` syntax.
Expand Down
4 changes: 4 additions & 0 deletions span_panel_simulator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
- Panel startup no longer fails with `AttributeError: 'NoneType' object has no attribute 'get'`. The developer bootstrap script re-resolved the emitter's
dependencies against PyPI instead of its lock file and pulled an `ebus-sdk` release incompatible with the `Device` API the emitter targets; setup now installs
the emitter's locked dependency set
- Add-on image builds again. Two separate problems blocked it: a redundant `force-include` in `pyproject.toml` re-added the dashboard templates and static
assets the package already shipped, writing each into the wheel twice (newer hatchling rejects the duplicate outright); and the add-on base image was still
Python 3.13 while the project now requires 3.14, so the wheel could not install even once it built. The base image moves to
`base-python:3.14-alpine3.23`
- Stopping the simulator now clears each panel's retained MQTT topics on every stop path, not just Ctrl-C. `scripts/run-local.sh --stop`, Docker, and the Home
Assistant supervisor all stop the process with SIGTERM, which was unhandled — the process died outright and its shutdown never ran, stranding a full retained
topic tree on the broker with `$state` flipped to lost by the Last Will. A panel that was renamed or removed left those topics orphaned for good
Expand Down
2 changes: 1 addition & 1 deletion span_panel_simulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-base-python:3.13-alpine3.21
ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-base-python:3.14-alpine3.23
FROM ${BUILD_FROM}

# Install mosquitto, jq, and build tools needed for native Python extensions
Expand Down
4 changes: 2 additions & 2 deletions span_panel_simulator/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build_from:
aarch64: ghcr.io/home-assistant/aarch64-base-python:3.13-alpine3.21
amd64: ghcr.io/home-assistant/amd64-base-python:3.13-alpine3.21
aarch64: ghcr.io/home-assistant/aarch64-base-python:3.14-alpine3.23
amd64: ghcr.io/home-assistant/amd64-base-python:3.14-alpine3.23
Loading