J. Nick Koston
2852d86a2f
Address review: robust regex and comment accuracy
...
- Fix extract_packed_value regex to handle commas in entity names
by matching C++ string literals instead of [^,]+
- Only describe dc/uom/icon in comments when their index is actually
non-zero, so comment matches what was packed
2026-03-06 11:18:11 -10:00
J. Nick Koston
c956b33e93
Add comment noting shift correctness is verified by integration test
2026-03-06 11:02:35 -10:00
J. Nick Koston
86dd579dea
Remove internal shift constants from unit tests
...
Tests now verify packed values via comment strings and non-zero
checks rather than decoding individual bit positions. This removes
the coupling to internal bit layout constants.
2026-03-06 11:00:19 -10:00
J. Nick Koston
41c413d5f7
Move extract_packed_value to shared component test helper
...
Add tests/component_tests/helpers.py with typed extract_packed_value()
and INTERNAL_BIT constant, replacing 5 duplicate copies.
2026-03-06 10:56:51 -10:00
J. Nick Koston
c704d97804
Strengthen internal flag assertions in component tests
...
All internal-flag tests now extract the packed value and verify
bit 24 is set/clear for the correct entities, instead of just
checking configure_entity_() call presence.
2026-03-06 10:54:19 -10:00
J. Nick Koston
54a8f558d6
Convert finalize tests to end-to-end through public API
...
Tests now go through _setup_entity_impl + setup_device_class/
setup_unit_of_measurement + finalize_entity_strings using real
CONF_* keys instead of internal _KEY_* constants.
2026-03-06 09:51:26 -10:00
J. Nick Koston
c37f1481ce
Derive entity category names from cv.ENTITY_CATEGORIES and cleanup
...
- Remove hardcoded _ENTITY_CATEGORY_NAMES dict, derive from cv.ENTITY_CATEGORIES keys
- Remove redundant local import re (already at top level)
- Remove last setup_test_environment noqa line
2026-03-06 09:46:28 -10:00
J. Nick Koston
dccc008383
Merge branch 'configure_entity' into protect_entity_setters
2026-03-06 09:44:16 -10:00
J. Nick Koston
69386cce2b
Strengthen test assertions for configure_entity_ packed values
...
- Sensor and text_sensor device_class tests now extract and verify the
packed argument is non-zero instead of just checking call presence
- Remove useless setup_test_environment fixture references in unit tests
2026-03-06 09:43:07 -10:00
J. Nick Koston
7117ded6b6
[core] Pack entity flags into configure_entity_() and protect setters
...
Move set_internal(), set_disabled_by_default(), set_entity_category(),
and set_device() to protected on EntityBase. These were codegen-only
setters never intended for runtime use.
internal, disabled_by_default, and entity_category are now packed into
the existing configure_entity_() uint32 parameter alongside string
indices, eliminating up to 3 separate function calls per entity.
set_device() is renamed to set_device_() per protected naming convention
and remains a separate call (pointer can't be packed).
Entity category integer mapping is derived from cv.ENTITY_CATEGORIES
to stay in sync with the C++ enum automatically.
2026-03-06 09:35:30 -10:00
J. Nick Koston
fd19bb4aa3
Merge remote-tracking branch 'upstream/dev' into configure_entity
...
# Conflicts:
# esphome/core/entity_base.h
2026-03-06 08:40:31 -10:00
J. Nick Koston and Copilot
8a915dcbbe
[core] Move device class strings to PROGMEM on ESP8266 ( #14443 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-03-06 08:34:27 -10:00
J. Nick Koston
6b53ccc85a
make it safer
2026-03-06 07:39:49 -10:00
J. Nick Koston
79d7795c07
Merge branch 'dev' into configure_entity
2026-03-06 07:33:40 -10:00
J. Nick Koston
a16b8fc0ac
[rp2040] Fix Pico W LED pin and auto-generate board definitions for arduino-pico 5.5.x ( #14528 )
2026-03-06 07:00:31 -10:00
J. Nick Koston and Copilot
74e4b69654
[core] Replace Application name/friendly_name std::string with StringRef ( #14532 )
...
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com >
2026-03-06 06:58:13 -10:00
J. Nick Koston
07e51886f3
[core] Move entity icon strings to PROGMEM on ESP8266 ( #14437 )
2026-03-06 06:57:52 -10:00
a2c0d70c2c
[ble_nus] Add uart support ( #14320 )
...
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 21:00:17 -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
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
J. Nick Koston
60fb99f715
Merge branch 'dev' into configure_entity
2026-03-05 10:50:51 -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
rwrozelle and J. Nick Koston
9518d88a2a
[openthread] static log level code quality improvement ( #14456 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-05 08:35:20 -10:00
Clyde Stubbs
f5c37bf486
[packet_transport] Minimise heap allocations ( #14482 )
2026-03-05 14:24:01 +11:00
J. Nick Koston
5df4fd0a27
[tests] Fix flaky uart_mock integration tests ( #14476 )
2026-03-04 15:51:51 -10:00
J. Nick Koston
b2e8544c58
[ld2412] Add integration tests with mock UART ( #14448 )
2026-03-04 07:18:31 -10:00
37146ff565
[integration] Add set method to publish and save sensor value ( #13316 )
...
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
2026-03-04 09:00:09 -05:00
J. Nick Koston and Claude Opus 4.6
9371159a7e
[core] Replace custom esphome::optional with std::optional ( #14368 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 01:14:05 +00:00
Jesse Hills
989330d6bc
[globals] Fix handling of string booleans in yaml ( #14447 )
2026-03-03 22:54:40 +00:00
Jonathan Swoboda and Claude Opus 4.6
ee78d7a0c0
[tests] Fix integration test race condition in PlatformIO cache init ( #14435 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 17:42:41 -05:00
J. Nick Koston and Claude Opus 4.6
c0873973c1
fix component tests to match configure_entity codegen
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 11:53:27 -10:00
J. Nick Koston and Claude Opus 4.6
42fa6ef818
[core] Merge set_name + set_entity_strings into configure_entity
...
Every entity generated two codegen calls:
entity->set_name("Name", hash);
entity->set_entity_strings(packed);
Merge these into a single configure_entity(name, hash, packed) call
to reduce generated code size. For a config with 50+ entities this
eliminates 50+ function calls from the generated setup() function.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 11:47:14 -10:00
J. Nick Koston
1f1b20f4fe
[core] Pack entity string properties into PROGMEM-indexed uint8_t fields ( #14171 )
2026-03-03 07:03:24 -10:00
b6f0bb9b6b
[speaker] Add off on capability to media player ( #9295 )
...
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ahrendt <kevin.ahrendt@openhomefoundation.org >
2026-03-03 10:59:01 -05:00
Clyde Stubbs
cfde0613bb
[const][uart][usb_uart][weikai][core] Move constants to components/const ( #14430 )
2026-03-03 07:53:18 -05:00
schrob and Jonathan Swoboda
60d66ca2dc
[openthread] Add tx power option ( #14200 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
2026-03-02 23:28:01 -05:00
J. Nick Koston
2e623fd6c3
[tests] Fix flaky log assertion race in oversized payload tests ( #14414 )
2026-03-02 11:48:50 -10:00
J. Nick Koston
3615a7b90c
[core] Eliminate __udivdi3 in millis() on ESP32 and RP2040 ( #14409 )
2026-03-02 11:42:25 -10:00
J. Nick Koston
a1d91ac779
[core] Compile-time detection of loop() overrides ( #14405 )
2026-03-02 06:59:23 -10:00
J. Nick Koston
82da4935b6
[core] Auto-wrap static strings in PROGMEM on ESP8266 via TemplatableValue ( #13885 )
2026-03-02 06:57:08 -10:00
77a7cbcffd
Use cached files on network errors in external_files ( #14055 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: jesserockz <3060199+jesserockz@users.noreply.github.com >
2026-03-02 11:41:20 -05:00
Bonne Eggleston and J. Nick Koston
3160457ca6
Create integration tests for modbus ( #14395 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-01 22:51:27 -10:00
J. Nick Koston
80a2acca4f
[ld2410] Add UART mock integration test for LD2410 component ( #14377 )
2026-03-01 18:19:32 -10:00
J. Nick Koston
48b5cae6c4
[api] Use StringRef for user service string arguments ( #13974 )
2026-03-02 10:32:44 +13:00
J. Nick Koston
067d773aac
[core] Make register_component protected, remove runtime checks ( #14371 )
2026-02-28 07:19:55 -10:00
J. Nick Koston and Claude Opus 4.6
49cc389bf0
[esp32] Wrap printf/vprintf/fprintf to eliminate _vfprintf_r (~11 KB flash) ( #14362 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-27 17:28:05 -10:00
J. Nick Koston
e7d4f2608b
[sen6x] Fix test sensor ID collisions with sen5x ( #14367 )
2026-02-27 16:01:17 -10:00
Jonathan Swoboda and Copilot
298ee7b92e
[gps] Fix codegen deadlock when automations reference sibling sensors ( #14365 )
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-02-27 19:08:42 -05:00
b9d70dcda2
[sen6x] Add SEN6x sensor support ( #12553 )
...
Co-authored-by: Martin Ebner <martinebner@me.com >
Co-authored-by: Tobias Stanzel <tobi.stanzel@gmail.com >
Co-authored-by: Big Mike <mike@bigmike.land >
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
2026-02-27 16:41:28 -05:00
Clyde Stubbs
2255c68377
[esp32] Enable execute_from_psram for P4 ( #14329 )
2026-02-28 06:40:55 +11:00