diff --git a/esphome/espidf/bootloader.py b/esphome/espidf/bootloader.py index 925d406e0b5..c514a5aaab9 100644 --- a/esphome/espidf/bootloader.py +++ b/esphome/espidf/bootloader.py @@ -359,7 +359,12 @@ def ensure_cached_bootloader(verbose: bool = False) -> bool: table_offset = (app_config or {}).get("PARTITION_TABLE_OFFSET") compiler = toolchain._resolved_c_compiler() if offset is None or table_offset is None or compiler is None: - _LOGGER.debug("Bootloader cache unusable: app configure outputs missing") + _LOGGER.info( + "Bootloader cache unusable: offset=%s table_offset=%s compiler=%s", + offset, + table_offset, + compiler, + ) return False try: dest = _install_cached(app_config, compiler, verbose) diff --git a/tests/unit_tests/test_espidf_bootloader.py b/tests/unit_tests/test_espidf_bootloader.py index de5423363bd..1026bb61b56 100644 --- a/tests/unit_tests/test_espidf_bootloader.py +++ b/tests/unit_tests/test_espidf_bootloader.py @@ -484,9 +484,13 @@ def test_size_check_overflow_raises(tmp_path: Path) -> None: # ------------------------------------------------------------ orchestration -def test_ensure_fails_soft_without_configure_outputs() -> None: +def test_ensure_fails_soft_without_configure_outputs( + caplog: pytest.LogCaptureFixture, +) -> None: """No app config or compiler id means fall back, not crash.""" - assert bootloader.ensure_cached_bootloader() is False + with caplog.at_level("INFO"): + assert bootloader.ensure_cached_bootloader() is False + assert "cache unusable" in caplog.text # says which input is missing @contextmanager