Claude bc35d616dd [bthome] Use StaticVector with compile-time sizes
Switch from FixedVector (runtime-sized, heap allocated) to StaticVector
(compile-time sized, stack allocated) for better memory efficiency:

**Changes:**
- Replace FixedVector with StaticVector in bthome.h
- Use cg.add_define to set sizes at compile time before creating component
- Remove runtime init() calls (StaticVector doesn't need them)
- Add default defines to esphome/core/defines.h for static analysis

**Benefits:**
- All memory allocated on stack at compile time
- Zero runtime allocation overhead
- Better for embedded systems with limited heap
- StaticVector allocates all N slots upfront (no dynamic growth)

**Defines added:**
- BTHOME_MAX_MEASUREMENTS: Max number of sensor measurements
- BTHOME_MAX_BINARY_MEASUREMENTS: Max number of binary sensor measurements
- BTHOME_MAX_ADV_PACKETS: Max advertisement packets for cycling

Sizes are calculated from YAML config and set via cg.add_define before
component instantiation, ensuring compile-time type safety.
2025-11-17 22:45:08 +00:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-11-13 17:00:47 +13:00
2025-07-17 22:40:28 +12:00
S
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses 545 MiB
Languages
C++ 60.1%
Python 39.3%
C 0.3%
JavaScript 0.2%