Commit Graph
484 Commits
Author SHA1 Message Date
J. Nick Koston f744568689 Merge remote-tracking branch 'upstream/component-8byte-optimization' into integration 2026-03-22 21:40:00 -10:00
J. Nick Koston 099bea00f6 Add test for _generate_source_table_code empty input 2026-03-22 21:30:22 -10:00
J. Nick Koston a92281f899 Add tests for register_component_source, remove redundant index check
- Test empty name returns 0
- Test deduplication returns same index
- Test overflow warns and returns 0
- Remove duplicate index==0 check in get_component_log_str() since
  component_source_lookup() already handles it
2026-03-22 21:24:13 -10:00
J. Nick Koston 33bb87b813 Simplify to uint8_t index, add friend declarations, fix tests
- Drop 9-bit index scheme in favor of plain uint8_t (max 255 unique
  source names, overflow warns in Python and returns 0)
- Add friend declarations for setup()/original_setup() so generated
  code can call protected set_component_source_()
- Move get_component_log_str() out of line
- Fix test mocks to provide CORE.data dict
2026-03-22 21:16:18 -10:00
J. Nick Koston 801b16f3fd Merge remote-tracking branch 'upstream/dev' into integration 2026-03-22 18:46:46 -10:00
J. Nick Koston 8a3b5a8def [core] Fix placement new storage name for templated types (#15096) 2026-03-23 16:09:23 +13:00
J. Nick Koston 6992219e34 [core] Attribute placement new storage symbols to components (#15092) 2026-03-22 16:27:07 -10:00
J. Nick Koston 20420d0016 Merge remote-tracking branch 'upstream/analyze-memory-pstorage-attribution' into integration 2026-03-22 15:05:20 -10:00
J. Nick Koston 2d10f8abd3 [analyze-memory] Attribute placement new storage symbols to components
Embed component namespace in storage variable names so analyze-memory
can reliably attribute them. Display as "storage for {id}" in reports
and always show regardless of size threshold.
2026-03-22 15:03:36 -10:00
J. Nick Koston 6a77b8b1f4 [light] Fix gamma LUT quantizing small brightness to zero (#15060) 2026-03-23 09:19:28 +13:00
J. Nick Koston 3f1bf4cd69 Merge remote-tracking branch 'upstream/fix-gamma-lut-zero-quantization' into integration 2026-03-21 10:32:28 -10:00
J. Nick Koston 41ff09d18a [light] Extract generate_gamma_table and add tests
Extract the gamma table generation into a public generate_gamma_table()
function and add unit tests covering table properties and the
zero_means_zero regression from #15055.
2026-03-21 08:23:52 -10:00
J. Nick Koston 02ada93ea5 [wifi] Reject WiFi config on RP2040/RP2350 boards without CYW43 chip (#14990) 2026-03-19 18:40:33 -10:00
J. Nick Koston 6348eafcb6 Merge remote-tracking branch 'upstream/fix-rp2040-wifi-validation' into integration 2026-03-19 16:15:46 -10:00
J. Nick Koston f8af05bbea Merge remote-tracking branch 'upstream/dev' into integration 2026-03-18 23:22:56 -10:00
Javier PeletierandJ. Nick Koston c2c50ceea7 [substitutions] substitutions pass and !include redesign (package refactor part 2a) (#14917)
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-18 23:10:01 -10:00
J. Nick Koston 3e845d387a [tests] Fix test_show_logs_serial taking 30s due to unmocked serial port wait (#14903) 2026-03-17 14:44:17 -10:00
J. Nick Koston d27a54553c Merge remote-tracking branch 'upstream/fix-slow-serial-log-test' into integration
# Conflicts:
#	.github/workflows/ci.yml
#	esphome/components/esp32_ble_server/ble_server.cpp
#	esphome/components/mqtt/mqtt_backend_esp32.cpp
#	script/cpp_benchmark.py
#	script/determine-jobs.py
2026-03-17 14:30:31 -10:00
J. Nick Koston cdf05263df [tests] Fix test_show_logs_serial taking 30s due to unmocked serial port wait
The test was calling show_logs() which invokes _wait_for_serial_port("/dev/ttyUSB0").
Since that path doesn't exist in CI/dev environments, it spun in a 30-second polling
loop before returning. Add mock_wait_for_serial_port fixture to skip the wait.
2026-03-17 14:26:24 -10:00
0c5f055d45 [core] cpp tests: Allow customizing code generation during tests (#14681)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-18 00:16:01 +00:00
J. Nick Koston 8daa946afa [esp32] Add crash handler to capture and report backtrace across reboots (#14709) 2026-03-12 14:00:20 +13:00
J. Nick Koston a5dffabe6e Merge branch 'esp32-crash-handler' into integration 2026-03-11 13:02:34 -10:00
J. Nick Koston 84813ded94 Add test for ESP32 crash handler stacktrace decoding 2026-03-11 10:43:52 -10:00
J. Nick Koston 829448a5c6 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-10 12:33:56 -10:00
J. Nick KostonandClaude Opus 4.6 6356e3def9 [core] Warn on crystal frequency mismatch during serial upload (#14582)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:42:38 +00:00
J. Nick Koston 58e65f9355 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-10 10:39:58 -10:00
Jonathan SwobodaandClaude Opus 4.6 8d988723cd [config] Allow !extend/!remove on components without id in schema (#14682)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 16:38:50 -04:00
J. Nick Koston 043290c204 Merge remote-tracking branch 'upstream/dev' into integration
# Conflicts:
#	esphome/__main__.py
#	esphome/core/log.cpp
#	esphome/core/log.h
#	esphome/util.py
#	tests/component_tests/logger/test_logger.py
#	tests/component_tests/logger/test_logger.yaml
#	tests/unit_tests/test_util.py
2026-03-10 10:34:19 -10:00
J. Nick Koston 2c7ef4f758 [rp2040] Use picotool for BOOTSEL upload and improve upload UX (#14483) 2026-03-10 09:10:33 -10:00
J. Nick Koston bc6691da9a Merge remote-tracking branch 'origin/rp2040-upload-improvements' into integration 2026-03-09 17:49:47 -10:00
J. Nick Koston 4b83de10e5 make linux error reporting more helpful 2026-03-09 17:45:03 -10:00
J. Nick Koston 399d695a39 Merge remote-tracking branch 'upstream/dev' into rp2040-upload-improvements 2026-03-09 17:45:00 -10:00
e82f0f4432 [cpptests] support testing platform components (#13075)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-10 02:41:02 +00:00
J. Nick Koston 6a0539b3d6 Merge branch 'inline-varint-parse-fast-path' into integration 2026-03-08 21:00:55 -10:00
J. Nick KostonandClaude Opus 4.6 088a8a4338 [ci] Match symbols with changed signatures in memory impact analysis (#14600)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:23:58 -10:00
J. Nick KostonandClaude Opus 4.6 d0285cdc41 [core] Pack entity flags into configure_entity_() and protect setters (#14564)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:11:15 -10:00
J. Nick KostonandClaude Opus 4.6 45f20d9c06 [core] Merge set_name + set_entity_strings into configure_entity_ (#14444)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 07:26:01 -10:00
J. Nick Koston 1336198423 Merge branch 'warn-crystal-mismatch' into integration
# Conflicts:
#	tests/unit_tests/test_util.py
2026-03-06 22:45:07 -10:00
J. Nick KostonandClaude Opus 4.6 696c0f021c Patch at import point instead of subprocess.run
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 22:38:44 -10:00
J. Nick KostonandClaude Opus 4.6 9f72d5e428 Add test for run_external_process line_callbacks coverage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 22:35:33 -10:00
J. Nick Koston dc4506453e Add tests for crystal callback wiring in upload_using_esptool
Tests both the in-process (run_external_command) and subprocess
(run_external_process) paths to ensure line_callbacks are passed.
2026-03-06 22:29:23 -10:00
J. Nick Koston 511e47b0f5 Remove unnecessary CORE mock from tests
CORE.reset() is called after each test via the reset_core fixture,
and CORE.dashboard defaults to False, so patching is not needed.
2026-03-06 22:26:12 -10:00
J. Nick Koston ae8dabc41a Add test for run_external_command with line_callbacks 2026-03-06 22:25:18 -10:00
J. Nick Koston c2747a6d35 Add tests and use walrus operator for crystal freq check 2026-03-06 22:09:52 -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 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 dffb964e0c Merge branch 'protect_entity_setters' into integration 2026-03-06 09:56:13 -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