Skip to content

ci: build firmware on Python 3.13 so releases use current ESPHome - #53

Merged
daniel-frenkel merged 3 commits into
mainfrom
ci/python-3.13
Nov 17, 2026
Merged

daniel-frenkel merged 3 commits into
mainfrom
ci/python-3.13

Conversation

@daniel-frenkel

@daniel-frenkel daniel-frenkel commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Why

ESPHome 2026.10 needs Python 3.12+. The workflow ran Python 3.11, so pip install esphome silently installed 2026.6.5, the last release that still supported 3.11. Every release through v2.12.2 was built on it. This moves CI to Python 3.13, so releases build on current ESPHome (2026.10.2 today).

Changes

  1. CI on Python 3.13 → current ESPHome.
  2. valar-motion v0.3.2 (scheduling: parse the Timezone string on the device (ESPHome 2026.10) valar-motion#11). ESPHome 2026.10 removed the on-device parser behind set_timezone(), which scheduling.yaml used for the web page's Timezone box, so v0.3.1 no longer compiles. v0.3.2 parses the string itself.
    • Behaviour is unchanged for every valid POSIX TZ string.
    • Malformed strings with a missing number (e.g. a trailing /) are now rejected with a warning instead of being read as 0.
  3. Collect binaries: ESPHome 2026.10 builds with ESP-IDF directly and writes the images to .esphome/build/<name>/build/ instead of .pioenvs/<name>/. The release step now finds them in either place and fails loudly if it can't.
  4. Regression gate fix: core, product and scheduling all register on_boot at priority -100, and the gate keyed bodies by priority alone, so one block overwrote the others. Same for intervals that share a period. Every body is now kept under its anchor in merge order.

Regression gate (fixed gate)

v2.12.2 as released (ESPHome 2026.6.5 + valar-motion v0.3.1) vs this PR (ESPHome 2026.10.2 + v0.3.2):

Board Entity gate Behaviour gate
VAL3000 clean 3 intended changes (below)
VAL3100 clean 3 intended changes (below)
  • esphome:on_boot -100: id(sntp_time)->set_timezone(...) → id(apply_timezone)->execute(...). That's the only line that changed.
  • text:Timezone set_action: now runs the apply_timezone script.
  • script:apply_timezone: new (the parser).

Same commit with only the ESPHome version changed (2026.6.5 vs 2026.10.2): both gates clean on both boards.

Verification

  • Timezone parser on a VAL3100, with both ESPHome 2026.6.5 and 2026.10.2:
    • IANA zones: every one (598 zones, 94 distinct strings) plus 37 edge cases, matching the reference parser field by field.
    • DST change dates 2026–2030: 9,802 / 9,802 UTC-offset checks match the POSIX rule. The only differences from zoneinfo are in 13 zones whose rule changes in 2026–27 a POSIX string can't express; ESPHome itself has the same limitation.
    • Web page Timezone box: a valid string is applied, an invalid one is rejected and the previous timezone kept.
  • Verified GitHub update: "Update Firmware (GitHub)" on a VAL3000 running an ESPHome 2026.10.2 build downloaded and installed v2.12.2 over verified TLS. ESPHome 2026.10 trims mbedTLS by default; http_request with verify_ssl keeps it.
  • Factory image layout: identical to v2.12.2 (same partition table and offsets; the app inside the factory image is the OTA image), so the web flasher and units in the field are unaffected.

Flash

Board v2.12.2 (local 2026.6.5 build) This PR (2026.10.2) Δ
VAL3000 1,218,176 B 1,212,432 B −5,744 B
VAL3100 1,319,160 B 1,290,860 B −28,300 B

The timezone parser itself costs about +2.0 KB on VAL3000 and +1.9 KB on VAL3100.

Other differences in the resolved config (not entities or automations)

  • Toolchain: ESP-IDF 5.5.4 → 5.5.6, pioarduino platform 55.03.39 → 55.03.312.
  • New defaults:
    • mbedTLS trimming (TLS kept by http_request).
    • web_server: enable_private_network_access true → false (the device page is same-origin).
    • safe_mode: boot_is_good_on_shutdown.
    • http_request: watchdog_timeout.
    • Flash storage options.
  • New build warnings: register_action(... synchronous=) notices from the stepper and tmc2209 components (informational).

Not in this PR

No release. The next tag builds on this.

🤖 Generated with Claude Code

ESPHome 2026.10 needs Python 3.12+. With the workflow on 3.11,
`pip install esphome` silently installed 2026.6.5, the last release that
still supported 3.11, so every release through v2.12.2 was built on it.

Regression gate (ESPHome 2026.6.5 vs 2026.10.2, both boards): entity and
behaviour gates clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
daniel-frenkel and others added 2 commits November 17, 2026 13:13
valar-motion v0.3.2 parses the Timezone string on the device; ESPHome
2026.10 removed the parser behind set_timezone(), so v0.3.1 no longer
compiled. Behaviour unchanged for every valid POSIX TZ string.

ESPHome 2026.10 builds with ESP-IDF directly and writes the images to
.esphome/build/<name>/build/ instead of .pioenvs/<name>/; the release
step now finds them in either place and fails loudly if it can't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core, product and scheduling all register on_boot at priority -100, and
several intervals share a period. The gate keyed bodies by priority or
period alone, so the last one overwrote the others and a change in a
hidden block (e.g. scheduling's on_boot) was never compared. Group them
under the anchor in merge order instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@daniel-frenkel
daniel-frenkel merged commit c8c3dc8 into main Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant