diff --git a/esphome/components/lora/switch/switch_lora.cpp b/esphome/components/lora/switch/switch_lora.cpp index 5bac173af1..5e526e0970 100644 --- a/esphome/components/lora/switch/switch_lora.cpp +++ b/esphome/components/lora/switch/switch_lora.cpp @@ -5,7 +5,7 @@ namespace lora { static const char *const TAG_SWITCH = "lora.switch"; void LoraSwitch::write_state(bool state) { - this->parent_->digital_write(this->pin_, state != this->inverted_); + this->parent_->digital_write(this->pin_, state); // finally set it this->publish_state(state); } diff --git a/esphome/components/lora/switch/switch_lora.h b/esphome/components/lora/switch/switch_lora.h index 352580a854..2fa0af9673 100644 --- a/esphome/components/lora/switch/switch_lora.h +++ b/esphome/components/lora/switch/switch_lora.h @@ -3,7 +3,6 @@ #include #include "esphome/core/component.h" #include "esphome/components/uart/uart.h" -#include "esphome/components/pcf8574/pcf8574.h" #include "esphome/components/switch/switch.h" #include "esphome/core/helpers.h" #include "esphome/core/log.h"