Commit Graph

96 Commits

Author SHA1 Message Date
J. Nick Koston 83e01035c9 Merge branch 'protect_entity_setters' into integration 2026-03-06 11:19:02 -10:00
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 c1c73dd619 Merge remote-tracking branch 'upstream/protect_entity_setters' into integration
# Conflicts:
#	tests/component_tests/binary_sensor/test_binary_sensor.py
#	tests/component_tests/button/test_button.py
#	tests/component_tests/text/test_text.py
#	tests/component_tests/text_sensor/test_text_sensor.py
2026-03-06 11:16:34 -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 b6b1378019 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:06 -10:00
J. Nick Koston dffb964e0c Merge branch 'protect_entity_setters' into integration 2026-03-06 09:56:13 -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 379e0b060f Merge branch 'configure_entity' into integration
# Conflicts:
#	esphome/components/api/api_connection.cpp
#	esphome/components/api/api_connection.h
#	esphome/core/application.h
#	esphome/core/config.py
#	esphome/core/entity_base.h
2026-03-06 08:47:29 -10:00
J. Nick Koston 6b53ccc85a make it safer 2026-03-06 07:39:49 -10:00
J. Nick Koston 191e5d70b5 Merge origin/log-skip-vprintf-indirection into integration 2026-03-05 22:12:26 -10:00
J. Nick Koston 8a2514a9c9 [log] Remove null check indirection from log functions
Call global_logger->log_vprintf_() directly without null-checking
global_logger on every log call. Logger::pre_setup() sets global_logger
before any other component is created in the generated setup() function,
so it is guaranteed to be valid by the time any log function is invoked.

Also removes the __FlashStringHelper* esp_log_vprintf_ overload which
was dead code (only called from esp_log_printf_, never directly).

Add a Python codegen test to verify the ordering invariant, and a
comment on App.pre_setup() documenting the constraint.
2026-03-05 21:47:25 -10:00
J. Nick Koston 60fb99f715 Merge branch 'dev' into configure_entity 2026-03-05 10:50:51 -10:00
J. Nick Koston 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
J. Nick Koston f50d7b516e Merge remote-tracking branch 'upstream/std-optional' into integration 2026-03-03 12:18:40 -10:00
J. Nick Koston 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 b4bad962b1 Merge branch 'dev' into std-optional 2026-03-03 07:12:29 -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
J. Nick Koston ac5ddd6465 Merge branch 'dev' into std-optional 2026-02-28 14:04:56 -10:00
J. Nick Koston 8e7b1638d0 address bot comments 2026-02-28 14:04:28 -10: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 39df0f6e51 more fixes 2026-02-27 16:22:59 -10:00
Clyde Stubbs 2255c68377 [esp32] Enable execute_from_psram for P4 (#14329) 2026-02-28 06:40:55 +11:00
Clyde Stubbs 4abbed0cd4 [mipi_dsi] Allow transform disable; fix warnings (#14216) 2026-02-24 08:33:33 -05:00
Clyde Stubbs 518f08b909 [mipi_dsi] Disallow swap_xy (#14124) 2026-02-21 19:51:13 +11:00
Andrew Rankin 7afd0eb1aa [esp32_ble] include sdkconfig.h before ESP-Hosted preprocessor guards (#13787)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:36:55 +00:00
schrob 67dfa5e2bc [epaper_spi] Validate BUSY pin as input instead of output (#13764) 2026-02-04 23:39:03 +00:00
Clyde Stubbs 9da2c08f36 [image] Correctly handle dimensions in physical units (#13209) 2026-01-15 03:27:26 +00:00
Clyde Stubbs 52c631384a [epaper_spi] Add Waveshare 2.13v3 (#13117) 2026-01-13 18:28:24 -05:00
Clyde Stubbs 738678e87b [image] Add define and core data (#13058) 2026-01-08 11:20:37 +11:00
J. Nick Koston 3cc6810be5 [core] Remove object_id RAM storage - no longer in hot path after #12627 (#12631) 2026-01-02 15:46:01 -10:00
Thomas Rupprecht 93e2a1bd1a [tests] improve mipi_spi variable naming (#12716) 2025-12-29 14:21:07 -05:00
Thomas Rupprecht dd3beb5841 [tests] fix typo mipi tests (#12715) 2025-12-29 14:20:38 -05:00
Jonathan Swoboda 45e61f100c [core] Replace USE_ESP_IDF with USE_ESP32 across components (#12673)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-12-27 11:59:55 -10:00
J. Nick Koston e0ce66e011 [core] Fix CORE.raw_config not updated after package merge (#12456) 2025-12-13 07:38:31 -06:00
Javier Peletier 9f2693ead5 [core] Packages refactor and conditional package inclusion (package refactor part 1) (#11605)
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-12-10 00:59:58 +01:00
Javier Peletier 88a2e75989 [packages] Add more information and deprecation deadline for "single package" includes (#12280) 2025-12-09 16:04:10 +01:00
Jesse Hills 7fd79fdded [esp32] Change imports to use esp32 only, not .const (#12243) 2025-12-05 09:53:08 -05:00
Thomas Rupprecht 22803ef54b [esp32] Sort variants in situ (#10410)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2025-12-03 20:48:11 -05:00
Jonathan Swoboda 4335fcdb72 [psram] Add C5 support (#12215)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-30 23:27:10 -05:00
Javier Peletier 12a51ff047 [packages] Fix package schema validation (#12116)
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-11-26 11:00:44 -06:00
J. Nick Koston b328758634 Revert "[core] Deduplicate identical stateless lambdas to reduce flash usage" (#12117) 2025-11-26 10:53:44 -06:00
J. Nick Koston bda17180df [core] Deduplicate identical stateless lambdas to reduce flash usage (#11918) 2025-11-26 12:48:08 +13:00
J. Nick Koston cf8c205644 [core] Reduce flash size by combining set_name() and set_object_id() calls (#11941) 2025-11-25 12:15:45 -06:00
Thomas Rupprecht 972b7e84fe [tests] Fix mipi_spi test board (#12031)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2025-11-21 08:38:44 -05:00
J. Nick Koston 96ee38759d [web_server.ota] Merge multiple instances to prevent undefined behavior (#11905) 2025-11-17 13:38:52 +13:00
J. Nick Koston 986d3c8f13 [sntp] Merge multiple instances to fix crash and undefined behavior (#11904) 2025-11-17 13:38:38 +13:00
Clyde Stubbs 758ac58343 [psram] Require mode for S3 (#11470)
Co-authored-by: clydeps <U5yx99dok9>
2025-11-04 16:38:43 +13:00