From 55c0ab50ede7cf25538365b6f0506138d604355d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Tue, 26 Mar 2024 19:08:56 +0000 Subject: [PATCH] try this --- esphome/components/lora/switch/switch_lora.cpp | 2 +- esphome/components/lora/switch/switch_lora.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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"