Backend-neutral unsupported-core message, pin the PIO source formatter

This commit is contained in:
J. Nick Koston
2026-08-20 23:55:15 -05:00
parent 85acafb646
commit 078bcba473
2 changed files with 19 additions and 3 deletions
+5 -2
View File
@@ -68,9 +68,12 @@ def framework_package_version(ver: Version) -> str:
package that cannot exist.
"""
if ver.major > 3:
# Backend-neutral: this also fires on the PlatformIO validation path
# (via _format_framework_arduino_version), where switching toolchains
# would not help
raise EsphomeError(
f"Arduino core {ver} has no known package encoding; "
"use 'toolchain: platformio'"
f"Arduino core {ver} is not supported yet; "
"the newest known core series is 3.x"
)
return f"3.{ver.major}{ver.minor:02d}{ver.patch:02d}.0"