J. Nick Koston
dedabba199
Merge branch 'app-name-stringref' into integration
...
# Conflicts:
# esphome/core/application.h
2026-03-05 15:46:47 -10:00
J. Nick Koston
8a6a7e0eeb
Add comment noting name is always non-empty in MAC suffix path
2026-03-05 15:42:53 -10:00
J. Nick Koston
363086b4f1
Extract make_app_name_cpp as testable free function with unit tests
...
Move the pure logic (string building, escaping, byte length
calculation) out of the nested closure into a module-level function
that can be tested without codegen mocks. Tests cover both copilot
review concerns: empty friendly_name with MAC suffix, and UTF-8
byte length for non-ASCII characters.
2026-03-05 15:35:31 -10:00
J. Nick Koston
3d9ed604a0
Fix empty friendly_name with MAC suffix and use UTF-8 byte lengths
...
When name_add_mac_suffix is true and friendly_name is empty, emit a
mutable static char[] buffer instead of a string literal to match the
char* signature. Also use UTF-8 byte lengths instead of Python str
len() to handle non-ASCII characters correctly.
2026-03-05 15:32:14 -10:00
J. Nick Koston
0f10a13631
Use ifdef to split pre_setup signatures for const correctness
...
When MAC suffix is not used, pre_setup takes const char* parameters
so string literals stay in flash. When MAC suffix is used, it takes
mutable char* for the static buffers that get overwritten with the
actual MAC address. This avoids const_cast entirely.
Also adds ESPHOME_NAME_ADD_MAC_SUFFIX define for static analysis.
2026-03-05 15:20:20 -10:00
J. Nick Koston
2b799b1ede
Use auto for App.get_name()/get_friendly_name() bindings
2026-03-05 15:13:13 -10:00
J. Nick Koston
2b2c42eff5
[core] Replace Application name/friendly_name with StringRef
...
Replace std::string members with StringRef for Application::name_
and Application::friendly_name_. These are set once during setup()
and never modified, so std::string overhead is unnecessary.
For the MAC suffix case, codegen emits static mutable char buffers
with a placeholder suffix that pre_setup() overwrites with the
actual MAC address. For the non-suffix case, StringRef points
directly at the string literal.
Saves ~2.5KB flash and ~48 bytes RAM by eliminating std::string
template instantiations (constructor, _M_assign, _M_dispose,
_M_construct, _M_replace_cold, _S_copy).
2026-03-05 15:12:09 -10:00
J. Nick Koston
0596980326
Merge branch 'rp2040-auto-gen-boards' into integration
2026-03-05 14:43:00 -10:00
J. Nick Koston
6febef0660
Add explicit encoding='utf-8' to read_text and write_text
2026-03-05 14:39:12 -10:00
J. Nick Koston
46d325065f
Filter out placeholder pin values (e.g. 99) during board generation
2026-03-05 14:31:08 -10:00
J. Nick Koston
b4c121fecf
Merge branch 'rp2040-auto-gen-boards' into integration
2026-03-05 14:14:16 -10:00
J. Nick Koston
3bebe728e4
Merge remote-tracking branch 'origin/rp2040-upload-improvements' into integration
2026-03-05 14:14:10 -10:00
J. Nick Koston
59b40de97a
silence warnings from code we do not control
2026-03-05 14:13:52 -10:00
J. Nick Koston
0d124208e1
Fix pylint unspecified-encoding in _get_variant
2026-03-05 14:12:03 -10:00
J. Nick Koston
b4ed8e036a
Move Jinja2 template to separate boards.jinja2 file
2026-03-05 14:03:54 -10:00
J. Nick Koston
e560594202
template
2026-03-05 14:03:33 -10:00
J. Nick Koston
424d4193b2
Fix pylint unspecified-encoding warnings in generate_boards.py
2026-03-05 13:57:40 -10:00
J. Nick Koston
e103ca20ba
[rp2040] Auto-generate boards.py from arduino-pico, fix Pico W LED pin
...
Add generate_boards.py script that reads board definitions and variant
pin headers from the arduino-pico repository to auto-generate boards.py
with support for 143+ boards including RP2350 variants.
Fix the Pico W LED pin from 32 (non-existent GPIO, never worked) to 64
(CYW43 wireless GPIO 0, hardware verified).
Make gpio.py pin validation data-driven:
- CYW43 virtual pin detection uses board pin map data
- Pin range based on MCU type from generated board metadata
- No hardcoded board names or magic numbers
2026-03-05 13:51:43 -10:00
Gnuspice
58ab630965
[ethernet] add get_eth_handle() function ( #14527 )
2026-03-05 23:37:07 +00:00
J. Nick Koston
aba845691f
Fix picotool tests on Windows
...
Use platform-appropriate binary name (picotool.exe on Windows)
when creating mock picotool files in tests.
2026-03-05 13:31:47 -10:00
J. Nick Koston
4780bd343c
Merge remote-tracking branch 'origin/rp2040-socket-wake' into integration
2026-03-05 13:21:43 -10:00
J. Nick Koston
868357fab8
Merge branch 'dev' into rp2040-socket-wake
2026-03-05 13:21:29 -10:00
J. Nick Koston
066c9b54dd
Merge branch 'rp2040-upload-improvements' into integration
2026-03-05 13:18:54 -10:00
J. Nick Koston
788a6019bd
imports
2026-03-05 13:18:36 -10:00
J. Nick Koston
90c3b94237
tweaks
2026-03-05 13:14:58 -10:00
J. Nick Koston
53da01a2bf
Merge branch 'rp2040-upload-improvements' into integration
2026-03-05 13:11:22 -10:00
J. Nick Koston
d1a669de72
Merge remote-tracking branch 'upstream/dev' into rp2040-upload-improvements
2026-03-05 13:11:02 -10:00
J. Nick Koston
c12d4a4474
[rp2040] Extract picotool package const, fix platform check for udev hint
...
- Add PICOTOOL_PACKAGE constant for the PlatformIO package name
- Only show udev rules hint on Linux, not on macOS/Windows
2026-03-05 13:09:41 -10:00
J. Nick Koston
ddbae0dd00
[rp2040] Always show BOOTSEL tip when no BOOTSEL device detected
...
Serial ports in the chooser may belong to other devices (e.g. FT232R),
not the RP2040. Show the BOOTSEL tip whenever no BOOTSEL device is
detected via picotool, regardless of whether serial ports are present.
2026-03-05 13:08:12 -10:00
J. Nick Koston
98e4a9f876
Merge branch 'dev' into rp2040-upload-improvements
2026-03-05 13:06:39 -10:00
J. Nick Koston
aec76fafce
[rp2040] Use picotool for BOOTSEL upload instead of mass storage copy
...
Replace UF2 file copy to mass storage volume with direct picotool upload.
This avoids macOS "disk not ejected properly" warnings caused by the RP2040
resetting immediately after receiving the firmware.
- Use picotool (already installed by PlatformIO) for BOOTSEL detection
and firmware upload via USB
- Upload ELF directly with `picotool load -v -x` for real-time progress
- Remove platform-specific mass storage volume detection (macOS/Linux/Windows)
- Show helpful udev rules message on Linux permission errors
2026-03-05 12:59:07 -10:00
64098122e7
[audio_file] Add media source platform ( #14436 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-05 12:30:13 -10:00
Jonathan Swoboda and Claude Opus 4.6
8a8f6824a2
[openthread][ethernet][wifi] Add IPv6 address array bounds assert ( #14488 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-05 12:29:44 -10:00
tomaszduda23
b2c12d88fe
[uart] init tx_pin, rx_pin, flow control, rx_buffer_size ( #14524 )
2026-03-05 12:24:11 -10:00
J. Nick Koston
4fd7d3a28f
Merge remote-tracking branch 'upstream/dev' into integration
...
# Conflicts:
# esphome/components/wifi/wifi_component_pico_w.cpp
2026-03-05 11:48:05 -10:00
Jonathan Swoboda and Claude Opus 4.6
e8b1dce67b
[st7735][st7789v][st7920] Fix display buffer overflows and dead code ( #14511 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-05 16:28:41 -05:00
J. Nick Koston
fbf63d8e3b
[rp2040] Update arduino-pico to 5.5.1 and fix WiFi AP fallback ( #14500 )
2026-03-05 21:23:00 +00:00
Kevin Ahrendt and J. Nick Koston
06d6322fe3
[audio] Extract detect_audio_file_type helper ( #14507 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-03-05 21:19:45 +00:00
de14e7055e
[cse7761][ads1115][tmp1075][matrix_keypad][seeed_mr60bha2] Fix assorted bugs ( #14518 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-03-05 21:10:26 +00:00
3392e4d73b
[usb_uart][nextion][feedback][whirlpool][packet_transport][he60r][hc8][runtime_stats] Fix millis() wrapping bugs ( #14474 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-03-05 16:08:58 -05:00
J. Nick Koston
21fb5975d6
Merge remote-tracking branch 'upstream/dev' into integration
...
# Conflicts:
# esphome/components/esphome/ota/ota_esphome.h
# esphome/components/http_request/ota/ota_http_request.cpp
# esphome/components/http_request/ota/ota_http_request.h
# esphome/components/ota/ota_backend_factory.h
# esphome/components/web_server/ota/ota_web_server.cpp
# esphome/components/wifi/wifi_component.cpp
2026-03-05 10:57:44 -10:00
b0be02e16d
[modbus] Fix timing bugs and better adhere to spec ( #8032 )
...
Co-authored-by: brambo123 <52667932+brambo123@users.noreply.github.com >
Co-authored-by: Keith Burzinski <kbx81x@gmail.com >
Co-authored-by: J. Nick Koston <nick@koston.org >
Co-authored-by: J. Nick Koston <nick+github@koston.org >
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-05 20:54:17 +00:00
Jonathan Swoboda and Claude Opus 4.6
d11e7cab46
[xiaomi_ble][pvvx_mithermometer][atc_mithermometer] Add BLE service data bounds checks ( #14514 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-05 20:18:54 +00:00
e25d740968
[wifi] Cache is_connected() for cheap inline access ( #14463 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-05 09:58:58 -10:00
Jonathan Swoboda and Claude Opus 4.6
291679126f
[nfc] Fix off-by-one in NDEF message parsing ( #14485 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-05 09:55:54 -10:00
dependabot[bot]
99a805cba6
Bump the docker-actions group across 1 directory with 2 updates ( #14520 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:52:10 -10:00
Jonathan Swoboda and Copilot
bb37887a8c
[wled][lcd_base][touchscreen][ee895] Fix off-by-one, buffer overrun, empty deref, and uninitialized pointers ( #14513 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-03-05 09:51:32 -10:00
5c5ea8824e
[audio_file] New component for embedding files into firmware ( #14434 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-03-05 09:51:08 -10:00
J. Nick Koston
a1ae9fadc2
Merge branch 'dev' into rp2040-upload-improvements
2026-03-05 09:48:55 -10:00
Jonathan Swoboda and Claude Opus 4.6
22d90d702d
[usb_cdc_acm][scd4x][pulse_counter][mopeka_std_check][ruuvi_ble] Fix assorted one-liner bugs ( #14495 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-05 09:47:55 -10:00