Files
esphome/tests/unit_tests
J. Nick Koston a19e817d28 [core] Shrink apply_to_core to what upload/logs actually read
apply_to_core was over-populating: it restored friendly_name,
loaded_integrations, and loaded_platforms even though every
consumer of those three lives inside a component validator
(esp32_camera, esp32, deep_sleep, zigbee, lvgl, zephyr_mcumgr),
and the whole point of the fast path is to skip validation.

Drop them. CORE.__init__ already leaves all three at safe defaults
(None / empty set) for any incidental reader.

What's left is exactly what upload/logs walk:

  - CORE.name (api.client.run_logs, firmware_bin path, mDNS)
  - CORE.build_path (firmware_bin / partition_table_bin / bootloader_bin)
  - CORE.data[KEY_CORE][KEY_TARGET_PLATFORM] (module dispatch, .is_esp32 etc)
  - CORE.data[KEY_CORE][KEY_TARGET_FRAMEWORK] (.is_arduino, firmware_bin branch)

Method body shrinks from 9 statements to 4; setdefault + two
conditional inserts collapse into one dict literal; the
function-local import moves to module top. Drift surface drops
from 7 paired fields to 4. The wizard-only-sidecar None case is
gated once at the load_compiled_config boundary so apply_to_core
no longer has to defend against it.
2026-05-12 17:29:29 -05:00
..
2025-09-19 12:59:48 +00:00
2022-10-05 20:09:27 +13:00
2025-09-19 12:59:48 +00:00