From e514a1fcd446f926b1f813971d22c450b75493f0 Mon Sep 17 00:00:00 2001 From: Ryan Mounce Date: Sun, 10 Oct 2021 18:58:37 +1030 Subject: [PATCH] Use enum for Tuya fan direction datapoint (#2471) Fix regression from PR2059. Tested with Arlec DCF5242HA. --- esphome/components/tuya/fan/tuya_fan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/tuya/fan/tuya_fan.cpp b/esphome/components/tuya/fan/tuya_fan.cpp index f060b18eba..d0c8809564 100644 --- a/esphome/components/tuya/fan/tuya_fan.cpp +++ b/esphome/components/tuya/fan/tuya_fan.cpp @@ -76,7 +76,7 @@ void TuyaFan::write_state() { if (this->direction_id_.has_value()) { bool enable = this->fan_->direction == fan::FAN_DIRECTION_REVERSE; ESP_LOGV(TAG, "Setting reverse direction: %s", ONOFF(enable)); - this->parent_->set_boolean_datapoint_value(*this->direction_id_, enable); + this->parent_->set_enum_datapoint_value(*this->direction_id_, enable); } if (this->speed_id_.has_value()) { ESP_LOGV(TAG, "Setting speed: %d", this->fan_->speed);