Fix tuya fan speed send (#1978)

This commit is contained in:
Trevor North 2021-07-04 12:47:22 +01:00 committed by GitHub
parent d5278351da
commit 9e400a7857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ void TuyaFan::write_state() {
} }
if (this->speed_id_.has_value()) { if (this->speed_id_.has_value()) {
ESP_LOGV(TAG, "Setting speed: %d", this->fan_->speed); ESP_LOGV(TAG, "Setting speed: %d", this->fan_->speed);
this->parent_->set_datapoint_value(*this->speed_id_, this->fan_->speed); this->parent_->set_datapoint_value(*this->speed_id_, this->fan_->speed - 1);
} }
} }