Update switch.py

This commit is contained in:
Daniël Koek 2024-05-18 16:25:18 +01:00
parent 699b6085a2
commit 424b765728

View file

@ -24,6 +24,5 @@ async def to_code(config):
ebyte_lora_component = await cg.get_variable(config[CONF_EBYTE_LORA_COMPONENT_ID])
var = await switch.new_switch(config)
await cg.register_parented(var, config[CONF_EBYTE_LORA_COMPONENT_ID])
await cg.register_component(var, config)
cg.add(var.set_pin(config[PIN_TO_SEND]))
cg.add(ebyte_lora_component.set_switch(var))