mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Reserve memory for component and platform vectors (#9042)
This commit is contained in:
@@ -159,6 +159,7 @@ async def register_switch(var, config):
|
||||
if not CORE.has_id(config[CONF_ID]):
|
||||
var = cg.Pvariable(config[CONF_ID], var)
|
||||
cg.add(cg.App.register_switch(var))
|
||||
CORE.register_platform_component("switch", var)
|
||||
await setup_switch_core_(var, config)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user