Commit Graph
13117 Commits
Author SHA1 Message Date
J. Nick Koston d01d2189b9 Guard device_class/UoM fields and lookups with #ifdef like icon 2026-02-21 01:22:18 -06:00
J. Nick Koston 1d547642e3 Use uint8_t for lookup indices and escape strings in codegen
- Change lookup function signatures from uint16_t to uint8_t since
  indices are stored in uint8_t fields (max 255 per category)
- Use cpp_string_escape() for string table entries to prevent
  compilation errors from special characters in user-provided strings
2026-02-21 01:11:06 -06:00
J. Nick Koston 95ee73e07f Store entity string indices as 3 uint8_t fields in struct padding
Replace uint32_t entity_string_packed_ with 3 separate uint8_t
fields (device_class_idx_, uom_idx_, icon_idx_) placed after the
1-byte EntityFlags struct. These fill the 3 padding bytes that
the compiler would insert anyway for alignment, saving 4 bytes
per entity with zero layout overhead.

The set_entity_strings(uint32_t) API is preserved — it unpacks
into the individual fields.
2026-02-21 00:28:16 -06:00
J. Nick Koston 2e93a7db78 Narrow packed fields to 8 bits each, reserve 8 bits for future use
8 bits per field (max 255) is more than sufficient — even large
configs use fewer than 40 unique icons, 14 device classes, and
11 units of measurement. This frees up 8 bits in the packed
uint32_t for future use.
2026-02-21 00:18:44 -06:00
J. Nick Koston 6c92e284c7 tweaks 2026-02-20 23:35:40 -06:00
J. Nick Koston 2906f56b3f tweaks 2026-02-20 23:32:28 -06:00
J. Nick Koston 7a9a0f9e75 Remove deprecated offsetof hack from NumberTraits
NumberTraits no longer needs get_device_class_ref() or
get_unit_of_measurement_ref() — no internal callers exist.
Callers should use number->get_device_class_ref() directly.
Eliminates offsetof warning on non-standard-layout type.
2026-02-20 23:21:53 -06:00
J. Nick Koston 6100d1c1d7 Remove leading null from blobs and EMPTY_REF from getters
- Blobs now start directly with first string (no wasted \0 prefix)
- Lookup functions handle index 0 by pointing to trailing null of blob
- get_*_ref() simplified: just calls lookup, no separate empty check
- Removes EMPTY_REF constant and per-getter branch
2026-02-20 23:09:30 -06:00
J. Nick Koston 22e9c30af1 Merge branch 'dev' into pack-entity-strings 2026-02-20 22:49:52 -06:00
J. Nick Koston 70fb8cc7c4 Remove empty EntityBase_DeviceClass/EntityBase_UnitOfMeasurement shells
These empty classes were only used internally by entity base classes,
not exposed to external components. No need for backward compat shells.
2026-02-20 22:48:46 -06:00
J. Nick Koston f1578351aa empty 2026-02-20 22:46:59 -06:00
J. Nick Koston e0f67da7b6 Use named constants and coroutine_with_priority for table generation
- Replace DeferredStatement with FINAL-priority coroutine job
- Add named constants for bit shifts and max values
- Use _DC_SHIFT in packed calculation for consistency
- Restore Args docstring on _setup_entity_impl
2026-02-20 22:38:25 -06:00
J. Nick Koston 4eac632939 pack_entity_strings 2026-02-20 22:36:15 -06:00
Rodrigo Martín 2eac106f11 [mqtt] add missing precision in HA autodiscovery (#14010) 2026-02-20 23:20:27 -05:00
J. Nick Koston f77da803c9 [api] Write protobuf encode output to pre-sized buffer directly (#14018) 2026-02-20 21:39:18 -06:00
J. Nick Koston f8f98bf428 [logger] Reduce UART driver heap waste on ESP32 (#14168) 2026-02-21 03:16:49 +00:00
J. Nick Koston abe37c9841 [uptime] Use scheduler millis_64() for rollover-safe uptime tracking (#14170) 2026-02-21 03:08:49 +00:00
J. Nick Koston 8589f80d8f [api,ota,captive_portal] Fix fd leaks and clean up socket_ip_loop_monitored setup paths (#14167) 2026-02-20 20:59:49 -06:00
J. Nick Koston 0e38acd67a [api] Warn when clients connect with outdated API version (#14145) 2026-02-20 19:21:56 -06:00
J. Nick Koston a3f279c1cf [usb_host] Implement disable_loop/enable_loop pattern for USB components (#14163) 2026-02-20 19:21:14 -06:00
J. Nick KostonandClaude Opus 4.6 35037d1a5b [core] Deduplicate base64 encode/decode logic (#14143)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:20:58 -06:00
J. Nick Koston d206c75b0b [logger] Fix loop disable optimization using wrong preprocessor guard (#14158) 2026-02-20 19:20:44 -06:00
tomaszduda23 1d3054ef5e [nrf52,logger] Early debug (#11685) 2026-02-20 16:12:50 -06:00
Jonathan SwobodaandClaude Opus 4.6 db6aa58f40 [max7219digit] Fix typo in action names (#14162)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:06:46 -05:00
PaweloandJ. Nick Koston 48115eca18 [safe_mode] Extract RTC_KEY constant for shared use (#14121)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-02-20 14:08:31 -06:00
dependabot[bot]andJ. Nick Koston edfc3e3501 Bump ruff from 0.15.1 to 0.15.2 (#14159)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-02-20 19:32:41 +00:00
dependabot[bot] 1a37632891 Bump pylint from 4.0.4 to 4.0.5 (#14160)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-20 19:27:45 +00:00
dependabot[bot] b85a49cdb3 Bump github/codeql-action from 4.32.3 to 4.32.4 (#14161)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-20 13:27:15 -06:00
9c0eed8a67 [e131] Remove dead LWIP TCP code path from loop() (#14155)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-02-20 17:03:39 +00:00
Jonathan Swoboda 887375ebef Merge branch 'release' into dev 2026-02-20 11:24:25 -05:00
Jonathan Swoboda 49356f4132 Merge pull request #14151 from esphome/bump-2026.2.1
2026.2.1
2026.2.1
2026-02-20 11:24:11 -05:00
Jonathan SwobodaandClaude Opus 4.6 403235e2d4 [wifi] Add band_mode configuration for ESP32-C5 dual-band WiFi (#14148)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:20:29 -05:00
Jonathan SwobodaandClaude Opus 4.6 9ce01fc369 [esp32] Add engineering_sample option for ESP32-P4 (#14139)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:20:05 -05:00
J. Nick Koston b0a35559b3 [esp32] Bump ESP-IDF to 5.5.3.1, revert GATTS workaround (#14147) 2026-02-20 10:19:01 -06:00
Jonathan Swoboda 8aaf0b8d85 Bump version to 2026.2.1 2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 28d510191c [ld2410/ld2450] Replace header sync with buffer size increase for frame resync (#14138)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 4c8e0575f9 [ld2420] Increase MAX_LINE_LENGTH to allow footer-based resync (#14137)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 49afe53a2c [ld2410] Add frame header synchronization to readline_() (#14136)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
d19c1b689a [ld2450] Add frame header synchronization to fix initialization regression (#14135)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 e7e1acc0a2 [pulse_counter] Fix PCNT glitch filter calculation off by 1000x (#14132)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
J. Nick Koston 7bdeb32a8a [uart] Always call pin setup for UART0 default pins on ESP-IDF (#14130) 2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 f412ab4f8b [wifi] Sync output_power with PHY max TX power to prevent brownout (#14118)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 0fc09462ff [safe_mode] Log brownout as reset reason on OTA rollback (#14113)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
J. Nick KostonandClaude Opus 4.6 d78496321e [esp32_ble] Enable CONFIG_BT_RELEASE_IRAM on ESP32-C2 (#14109)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 ac76fc4409 [pulse_counter] Fix build failure when use_pcnt is false (#14111)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 a343ff1989 [ethernet] Improve clk_mode deprecation warning with actionable YAML (#14104)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:12 -05:00
Jonathan SwobodaandClaude Opus 4.6 2d2178c90a [socket] Fix IPv6 compilation error on host platform (#14101)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:17:11 -05:00
J. Nick Koston 25b14f9953 [e131] Fix E1.31 on ESP8266 and RP2040 by restoring WiFiUDP support (#14086) 2026-02-20 10:17:11 -05:00
J. Nick Koston 2491b4f85c [ld2420] Use constexpr for compile-time constants (#14079) 2026-02-20 10:17:11 -05:00
J. Nick Koston cb8b14e64b [web_server] Fix water_heater JSON key names and move traits to DETAIL_ALL (#14064) 2026-02-20 10:17:11 -05:00