From 2a69352c56c577ada23f60a97963fb2847178abb Mon Sep 17 00:00:00 2001 From: Piotr Szulc Date: Mon, 1 Jul 2024 21:16:57 +0200 Subject: [PATCH] Also fake status pin --- esphome/components/tuya/tuya.cpp | 6 ++---- esphome/core/util.cpp | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/esphome/components/tuya/tuya.cpp b/esphome/components/tuya/tuya.cpp index de3d5e97e7..25bec051da 100644 --- a/esphome/components/tuya/tuya.cpp +++ b/esphome/components/tuya/tuya.cpp @@ -2,7 +2,6 @@ #include "esphome/core/gpio.h" #include "esphome/core/helpers.h" #include "esphome/core/log.h" -#include "esphome/core/util.h" namespace esphome { namespace tuya { @@ -484,15 +483,14 @@ void Tuya::send_empty_command_(TuyaCommandType command) { } void Tuya::set_status_pin_() { - bool is_network_ready = network::is_connected() && remote_is_connected(); - this->status_pin_->digital_write(is_network_ready); + this->status_pin_->digital_write(true); } uint8_t Tuya::get_wifi_status_code_() { uint8_t status = NET_STATUS_WIFI_CONNECTED; // Protocol version 3 also supports specifying when connected to "the cloud" - if (this->protocol_version_ >= 0x03 && remote_is_connected()) { + if (this->protocol_version_ >= 0x03) { status = NET_STATUS_CLOUD_CONNECTED; } diff --git a/esphome/core/util.cpp b/esphome/core/util.cpp index 996cf8e310..836f040915 100644 --- a/esphome/core/util.cpp +++ b/esphome/core/util.cpp @@ -32,6 +32,4 @@ bool mqtt_is_connected() { return false; } -bool remote_is_connected() { return api_is_connected() || mqtt_is_connected(); } - } // namespace esphome