Commit Graph
810 Commits
Author SHA1 Message Date
J. Nick Koston a5ab07b441 Merge remote-tracking branch 'origin/remove-deprecated-get-object-id-compilation-time' into integration 2026-06-21 11:35:05 -05:00
J. Nick Koston 495685fab9 Merge remote-tracking branch 'origin/web-server-logs' into integration 2026-06-21 11:35:05 -05:00
J. Nick Koston b95706191d Merge remote-tracking branch 'origin/clearer-network-resolve-error' into integration 2026-06-21 11:35:04 -05:00
J. Nick Koston 07624a2907 [core] Clarify object_id docstring to match C++ behavior 2026-06-21 11:02:08 -05:00
J. Nick Koston 404f098419 [core] Update stale get_object_id() docstring reference in test 2026-06-21 10:53:14 -05:00
J. Nick Koston a97f9e7cda [core] Add esphome logs over web_server HTTP SSE
Stream device logs over the web_server /events Server-Sent Events feed so
'esphome logs' works on devices that have web_server: but no api:. This is
the logging counterpart to web_server OTA. Priority stays API, then MQTT,
then web_server. Reconnects automatically when the stream drops.

Factor the resolve-to-URLs step and the web_server port/auth lookup shared
with web_server OTA into a new web_server_helpers module (resolve_web_server_urls
and get_web_server_connection), with helpers.format_ip_url for IPv4/IPv6 URL
formatting, and broaden the missing-transport log error to suggest web_server:
alongside api:/MQTT/USB.
2026-06-21 10:50:49 -05:00
J. Nick Koston c826293efc [core] Clarify resolve error when a device has no network log/OTA transport
A device with a static IP, mDNS disabled, and no api: component failed
logs with "All specified devices ['OTA'] could not be resolved" and a
hint to set use_address; the hint is misleading since the static IP
already resolves, the real gap is that network logs ride the native API.

Name the missing transport instead: api: for logs, an ota: platform for
uploads. The generic "could not be resolved" message stays for a
genuinely unreachable address.
2026-06-21 09:48:27 -05:00
J. Nick Koston b3a9b18ca8 Merge remote-tracking branch 'upstream/dev' into integration 2026-06-18 16:27:23 -05:00
J. Nick Koston 70c11a7f3e Merge remote-tracking branch 'upstream/logger-buffered-recursion-guard' into integration 2026-06-18 16:12:45 -05:00
Jonathan Swoboda 53e85e07d4 [esp32] Support esphome idedata with the native ESP-IDF toolchain (#17040) 2026-06-18 15:56:21 -04:00
J. Nick KostonandCopilot Autofix powered by AI bd9375117a [core] Honor transferred address cache in has_resolvable_address (#17025)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-17 22:11:24 -05:00
Jesse Hills c214a8ce79 [core] Add generic component alias infrastructure (#16826) 2026-06-18 01:21:00 +00:00
tomaszduda23andJonathan Swoboda e3f164fff2 [nrf52] add support for native builds (#16898)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-06-17 21:17:07 -04:00
Jesse Hills d8fa0e4140 [core] Stop parent git repos from breaking ESP-IDF/PlatformIO builds (#16994) 2026-06-16 20:24:26 +12:00
Jonathan Swoboda e191fc5d47 [core] Support platformio_options on the native ESP-IDF toolchain (#16917) 2026-06-15 10:56:03 +12:00
Jonathan Swoboda 1e5771a3fa [esp32] Fix idedata generation failing on unset ESPHOME_ARDUINO (#16925) 2026-06-15 09:48:43 +12:00
J. Nick Koston 750cf1995b [esp8266] Decode crash handler PC and backtrace in logs (#16911) 2026-06-11 08:47:50 -05:00
Jonathan Swoboda 29a79b1373 [core] Make set_cpp_standard work on the native IDF toolchain (#16907) 2026-06-11 07:25:03 +12:00
Clyde StubbsandClaude Opus 4.8 dafc3560dd [tests] Isolate ESPHOME_LOG_STATES in main logs-states tests (#16905)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 07:44:58 -04:00
Jonathan Swoboda 6809af3de0 [espidf] Warn when the install path is too long for Windows MAX_PATH (#16896) 2026-06-10 13:12:28 +12:00
Jonathan Swoboda 4963ddcb95 [espidf] Fix idedata generation on Windows (#16894) 2026-06-10 13:09:50 +12:00
5faed9d5f5 [nrf52] native build - download toolchain and sdk in venv (#16388)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <swoboda1337@users.noreply.github.com>
2026-06-09 07:04:51 -04:00
Jonathan Swoboda 6996b7ed1c [ci] Add ESP32 Variants clang-tidy run (S3/P4/C6) (#16825) 2026-06-05 22:03:08 -04:00
Jonathan Swoboda 8aa4157574 [fastled_base] Use FastLED IDF component on ESP32 (#16804) 2026-06-05 21:01:29 -04:00
Jonathan Swoboda 891ec33c94 [esp32] Deduplicate PlatformIO library conversion by resolving the batch together (#16756) 2026-06-04 07:39:17 -04:00
Jesse Hills 93f25258ee [config] Add --no-defaults flag to config command (#16718) 2026-06-04 14:08:36 +12:00
Jonathan Swoboda 74a1ff9fc7 [esp32][core] Restore ESP-IDF version on logs/upload fast path and clean build on framework change (#16770) 2026-06-04 09:46:01 +12:00
Jonathan Swoboda e4980713d1 [core] esphome clean wipes the whole build directory (#16772) 2026-06-03 07:35:23 -04:00
Clyde Stubbs d7d20f4f6b [cli] Allow state reporting control via env (#16746) 2026-06-02 07:04:35 +10:00
Jonathan Swoboda 6116d10ab1 [espidf] Derive idedata from the native ESP-IDF compile_commands.json (#16742) 2026-05-31 17:44:12 -04:00
Jonathan Swoboda 48844a68ba [core] Clean build when the toolchain changes (#16744) 2026-05-31 16:29:16 -04:00
J. Nick Koston f0202155b3 [core] Persist esphome.area in StorageJSON (#16710) 2026-05-30 00:09:07 -05:00
rwrozelleandJonathan Swoboda 9a6157b469 [tests] Sandbox PlatformIO paths in test_writer to fix xdist race (#16619)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-05-27 15:50:43 -04:00
J. Nick Koston 21e548f1d7 [core] Sensitive redaction via yaml_util representer (#16690) 2026-05-27 09:20:50 -05:00
J. Nick Koston 3ce95682ca Merge remote-tracking branch 'origin/cv-sensitive-redact-sentinel' into integration 2026-05-26 23:51:13 -05:00
J. Nick Koston 4c6437b825 [core] Anchor legacy redaction regex to avoid false-positive warnings
The unanchored leading \w* could match fields like 'monkey:' (via the
'key' fragment), naming a non-sensitive field in the deprecation
warning. Restrict the fragment to either start the name or follow '_',
so warnings only fire when there's an actual sensitive-shaped field
the author can migrate.
2026-05-26 22:46:41 -05:00
J. Nick Koston bc2a811568 [core] Skip !secret and !lambda in legacy fallback regex
Address reviewer feedback:

- legacy regex was wrapping password: !secret name and clobbering
  the dumper's user-friendly !secret round-trip; extend the negative
  lookahead to skip !secret (and !lambda) values entirely
- drop the in-replacement !lambda check now that the lookahead handles it
- reword the thread-safety claim in dump() since _SECRET_VALUES /
  _SECRET_CACHE remain module globals
- reword the SensitiveStr representer registration comment to reflect
  PyYAML's MRO-walked dispatch rather than registration order
- tighten the legacy regex comment

Adds tests for the !secret and !lambda skip paths.
2026-05-26 22:23:40 -05:00
J. Nick Koston 6d689e8297 [core] Suppress deprecation warning for lambda values in tagged fields
Lambda values in cv.sensitive(cv.templatable(...)) fields still hit the
legacy regex because Lambda isn't a str and therefore doesn't carry the
SensitiveStr tag. The field IS tagged correctly; warning the author to
add cv.sensitive would be misleading. Still wrap the first line so the
user-visible output matches the prior regex.
2026-05-26 22:18:09 -05:00
J. Nick Koston e358b8328f [core] Cover command_config redaction wiring
Add two tests that exercise command_config end-to-end: one confirms the
legacy fallback wraps an unmarked sensitive field, the other confirms
--show-secrets bypasses redaction. Closes the patch-coverage gap on the
'output = _redact_with_legacy_fallback(output)' line.
2026-05-26 22:13:49 -05:00
J. Nick Koston 27385cee32 [core] Tighten legacy redaction regex to avoid mid-word matches
The trailing \w* after the fragment over-matched fields like
key_value_pair: which the prior regex did not catch. Drop it so the
fragment must end the captured field name, preserving the previous
matching scope while still capturing the full field name (via the
leading \w*) for the warning message.
2026-05-26 22:06:25 -05:00
J. Nick Koston 2e53a226a3 [core] Keep legacy redaction regex as deprecation fallback
Restore the substring regex as a second pass in command_config so
sensitive-shaped fields that haven't been tagged with cv.sensitive(...)
yet are still redacted. Each unique unmarked field name caught by the
heuristic emits a one-time deprecation warning naming the field and the
fix; the fallback itself is slated for removal in 2026.12.0.
2026-05-26 21:55:35 -05:00
J. Nick Koston 23df0229a2 [core] Type represent_sensitive and hoist SensitiveStr import in test 2026-05-26 21:52:22 -05:00
J. Nick Koston 49b9d9313e [core] Sensitive redaction via yaml_util representer
cv.sensitive(...) now returns a SensitiveStr (thin str subclass) so the
tag travels with the validated value. yaml_util.dump constructs a
per-call ESPHomeDumper subclass with a class-attribute redaction flag;
the PyYAML representer for SensitiveStr renders values wrapped in
literal \\033[8m...\\033[28m text when show_secrets is False and raw
when True. The post-dump regex in command_config is deleted.

Also tags wifi.ssid sites with cv.sensitive so SSID coverage isn't lost
when the regex (which matched 'ssid:' via substring) goes away.

No module-level mutable state; the per-call subclass keeps each dump
invocation self-contained and thread-safe by construction.
2026-05-26 21:49:31 -05:00
J. Nick Koston 96816e2491 [core] Enable ruff DTZ (flake8-datetimez) lint family (#16660) 2026-05-26 15:29:38 -05:00
J. Nick Koston bac62cb7de [core] Add cv.sensitive marker for schema-level sensitive fields (#16673) 2026-05-26 15:29:06 -05:00
J. Nick Koston ceb9d406e1 [core] Enable ruff PIE (flake8-pie) lint family (#16658) 2026-05-26 07:46:44 -04:00
Jesse Hills 423b60c90c [packages] Resolve git symlinks on Windows when materialized as text (#16657) 2026-05-26 19:56:44 +12:00
J. Nick Koston ae74920b81 [core] Enable ruff PTH (flake8-use-pathlib) lint family (#16661) 2026-05-26 05:14:42 +00:00
J. Nick Koston ae814cff5c [core] Enable ruff B (flake8-bugbear) lint family (#16655) 2026-05-26 02:28:14 +00:00
J. Nick Koston 489cf483d0 [core] Enable ruff PYI (flake8-pyi) lint family (#16654) 2026-05-25 20:55:35 -05:00