Fetch the bh1745 hub once

This commit is contained in:
J. Nick Koston
2026-10-20 17:48:01 -10:00
parent ba3bc70bbb
commit ff36d3a6c8
+2 -2
View File
@@ -17,8 +17,8 @@ CONFIG_SCHEMA = output.BINARY_OUTPUT_SCHEMA.extend(
async def to_code(config: ConfigType) -> None:
await output.sub_binary_outputs(config, parent=config[CONF_BH1745_ID]).create(
hub = await cg.get_variable(config[CONF_BH1745_ID])
await output.sub_binary_outputs(config, parent=hub).create(
config, None, apply="set_interrupt_state(state)"
)
hub = await cg.get_variable(config[CONF_BH1745_ID])
cg.add(hub.enable_interrupt_output())