mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 16:08:10 +01:00
Update switch.py
This commit is contained in:
parent
699b6085a2
commit
424b765728
1 changed files with 0 additions and 1 deletions
|
@ -24,6 +24,5 @@ async def to_code(config):
|
||||||
ebyte_lora_component = await cg.get_variable(config[CONF_EBYTE_LORA_COMPONENT_ID])
|
ebyte_lora_component = await cg.get_variable(config[CONF_EBYTE_LORA_COMPONENT_ID])
|
||||||
var = await switch.new_switch(config)
|
var = await switch.new_switch(config)
|
||||||
await cg.register_parented(var, config[CONF_EBYTE_LORA_COMPONENT_ID])
|
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(var.set_pin(config[PIN_TO_SEND]))
|
||||||
cg.add(ebyte_lora_component.set_switch(var))
|
cg.add(ebyte_lora_component.set_switch(var))
|
||||||
|
|
Loading…
Reference in a new issue