[infrared,radio_frequency] queue_entity_register before setup_core_

The setup_<X>_core_ functions are decorated with @setup_entity, which calls
finalize_entity_strings() before returning. queue_entity_register() must run
before that so the combined App.register_<entity>(var, name, hash, packed)
emission is selected; otherwise finalize falls back to configure_entity_ and
no register call is emitted.

Reported by Copilot review on PR #16030.
This commit is contained in:
J. Nick Koston
2026-04-26 14:54:15 -05:00
parent 97e8417ac6
commit c32f6f629b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -54,8 +54,8 @@ async def register_infrared(var: cg.Pvariable, config: ConfigType) -> None:
"""Register an infrared device with the core."""
cg.add_define("USE_IR_RF")
await cg.register_component(var, config)
await setup_infrared_core_(var, config)
queue_entity_register("infrared", config)
await setup_infrared_core_(var, config)
CORE.register_platform_component("infrared", var)
@@ -55,8 +55,8 @@ async def register_radio_frequency(var: cg.Pvariable, config: ConfigType) -> Non
"""Register a radio frequency device with the core."""
cg.add_define("USE_RADIO_FREQUENCY")
await cg.register_component(var, config)
await setup_radio_frequency_core_(var, config)
queue_entity_register("radio_frequency", config)
await setup_radio_frequency_core_(var, config)
CORE.register_platform_component("radio_frequency", var)