This commit is contained in:
Daniël Koek 2024-03-26 19:08:56 +00:00
parent 056025c5d0
commit 55c0ab50ed
2 changed files with 1 additions and 2 deletions

View file

@ -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);
}

View file

@ -3,7 +3,6 @@
#include <vector>
#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"