Use enum for Tuya fan direction datapoint (#2471)

Fix regression from PR2059. Tested with Arlec DCF5242HA.
This commit is contained in:
Ryan Mounce 2021-10-10 18:58:37 +10:30 committed by GitHub
parent a1b28cb36e
commit e514a1fcd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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