mirror of
https://github.com/esphome/esphome.git
synced 2026-03-03 11:18:21 -07:00
f926978f61639a77d9b83d960af758425c77cdfb
Instead of runtime null, duplicate, and capacity checks in register_component_, make the method unreachable from outside codegen by removing the public template wrapper and granting friend access to the codegen-generated ::setup() function. Since ESPHOME_COMPONENT_COUNT is set to exactly len(CORE.component_ids) at codegen time, the StaticVector is always correctly sized and the runtime capacity check cannot trigger from codegen. External components that bypassed codegen to call App.register_component() directly will now get a compile error, forcing them to properly declare their components in their config schema. Co-Authored-By: J. Nick Koston <nick@koston.org>
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
262 MiB
Languages
C++
64%
Python
35.6%
C
0.3%
