diff --git a/esphome/components/lora/__init__.py b/esphome/components/lora/__init__.py index cf623e1dd9..4aed831977 100644 --- a/esphome/components/lora/__init__.py +++ b/esphome/components/lora/__init__.py @@ -69,7 +69,7 @@ async def to_code(config): sens = await text_sensor.new_text_sensor(config[CONF_LORA_MESSAGE]) cg.add(var.set_message_sensor(sens)) - if CONF_LORA_MESSAGE in config: + if CONF_PCF8574 in config: comp = await cg.get_variable(config[CONF_PCF8574]) cg.add(var.set_pcf8574(comp))