mirror of
https://github.com/esphome/esphome.git
synced 2025-02-07 13:40:59 +00: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
@ -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…
x
Reference in New Issue
Block a user