mirror of
https://github.com/esphome/esphome.git
synced 2024-11-14 02:58:11 +01:00
Use enum for Tuya fan direction datapoint (#2471)
Fix regression from PR2059. Tested with Arlec DCF5242HA.
This commit is contained in:
parent
a1b28cb36e
commit
e514a1fcd4
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ void TuyaFan::write_state() {
|
||||||
if (this->direction_id_.has_value()) {
|
if (this->direction_id_.has_value()) {
|
||||||
bool enable = this->fan_->direction == fan::FAN_DIRECTION_REVERSE;
|
bool enable = this->fan_->direction == fan::FAN_DIRECTION_REVERSE;
|
||||||
ESP_LOGV(TAG, "Setting reverse direction: %s", ONOFF(enable));
|
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()) {
|
if (this->speed_id_.has_value()) {
|
||||||
ESP_LOGV(TAG, "Setting speed: %d", this->fan_->speed);
|
ESP_LOGV(TAG, "Setting speed: %d", this->fan_->speed);
|
||||||
|
|
Loading…
Reference in a new issue