From 039810eef399579a99b82ad2790d8a287b72e5f5 Mon Sep 17 00:00:00 2001 From: Ryan Mounce Date: Mon, 7 Dec 2020 17:00:55 +1030 Subject: [PATCH] Fix Tuya initialisation regression (#1408) --- esphome/components/tuya/tuya.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/tuya/tuya.cpp b/esphome/components/tuya/tuya.cpp index cadb45fbe3..feaab9b0ed 100644 --- a/esphome/components/tuya/tuya.cpp +++ b/esphome/components/tuya/tuya.cpp @@ -160,7 +160,7 @@ void Tuya::handle_command_(uint8_t command, uint8_t version, const uint8_t *buff } if (this->init_state_ == TuyaInitState::INIT_CONF) { // If mcu returned status gpio, then we can ommit sending wifi state - if (this->gpio_status_ != 0) { + if (this->gpio_status_ != -1) { this->init_state_ = TuyaInitState::INIT_DATAPOINT; this->schedule_empty_command_(TuyaCommandType::DATAPOINT_QUERY); } else {