From 69966390744199769426a1778d0b00e488e6122b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Mon, 25 Mar 2024 16:20:15 +0000 Subject: [PATCH] Update __init__.py --- esphome/components/lora/switch/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/lora/switch/__init__.py b/esphome/components/lora/switch/__init__.py index f778651f61..940de63f3f 100644 --- a/esphome/components/lora/switch/__init__.py +++ b/esphome/components/lora/switch/__init__.py @@ -6,13 +6,13 @@ from .. import CONF_LORA, Lora, lora_ns LoraSwitch = lora_ns.class_("LoraSwitch", switch.Switch, cg.Component) - +CONF_LORA_PIN = "pin_to_send" CONFIG_SCHEMA = ( switch.switch_schema(LoraSwitch, block_inverted=True) .extend( { cv.Required(CONF_LORA): cv.use_id(Lora), - cv.Required(CONF_PIN): cv.int_range(min=1, max=256), + cv.Required(CONF_LORA_PIN): cv.int_range(min=1, max=256), } ) .extend(cv.COMPONENT_SCHEMA) @@ -24,4 +24,4 @@ async def to_code(config): parent = await cg.get_variable(config[CONF_LORA]) await cg.register_component(var, config) cg.add(var.set_parent(parent)) - cg.add(var.set_pin(config[CONF_PIN])) + cg.add(var.set_pin(config[CONF_LORA_PIN]))