mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Use enum for Tuya fan direction datapoint (#2471)
Fix regression from PR2059. Tested with Arlec DCF5242HA.
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user