## Introduction to Xiaomi Home Assistant
The Xiaomi Home Assistant is a smart home system that integrates various devices, including the Yeelight smart fan. However, users have encountered issues with the Yeelight smart fan, specifically with its speed count and percentage settings.
## Problem Description
The Yeelight smart fan (yeelink.ven_fan.vf1) has only two speed settings: high and low. However, the speed count is set to 100%, which is incorrect. When adjusting the percentage in the UI or using the `fan.set_percentage` command in Home Assistant, the system reports an error if the setting is not 50% or 100%.
## Reproducing the Issue
To reproduce the issue, follow these steps:
1. Use the Yeelight smart fan (yeelink.ven_fan.vf1) with the Xiaomi Home Assistant.
2. Adjust the fan speed to a percentage other than 50% or 100% using the UI or the `fan.set_percentage` command.
3. Observe the error message indicating that the setting has failed.
## Expected Behavior
The expected behavior is that the speed count for the Yeelight smart fan should be set to 2, reflecting its two-speed setting. The UI should only allow users to select high or low fan speeds. When using the `fan.set_percentage` command, the system should adjust non-standard values to the nearest valid setting.
## Troubleshooting
To troubleshoot this issue, check the Home Assistant logs for any error messages related to the Yeelight smart fan. Also, verify that the Xiaomi Home Integration version is up-to-date, as updates may have resolved similar issues.
## Logs and Version Information
* Home Assistant Core Version: 2024.12.5
* Home Assistant Operation System Version: Supervisor 2024.12.1/Operating System Frontend 20241127.8
* Xiaomi Home Integration Version: v0.1.3
* Log Timezone: Asia/Shanghai
## Additional Context
For further assistance, provide any additional context or information about the issue, such as the exact error messages or any other relevant details.
## Conclusion
In conclusion, the Yeelight smart fan issue with the Xiaomi Home Assistant can be resolved by adjusting the speed count to 2 and ensuring that the UI and `fan.set_percentage` command behave as expected. By following the troubleshooting steps and providing detailed logs and version information, users can help resolve this issue and enjoy a seamless smart home experience.