rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.82k stars 544 forks source link

Fan speed control not working #410

Open milothomas opened 3 years ago

milothomas commented 3 years ago

I have added a Fan via the integration page and I can turn it on/off. It also has a set of LED lights which I can also turn on/off.

However, I am unable to change the speed of the fan. The fan has 6 speed levels and I suspect that the third item on list (see screenshot) is the speed control but I'm not able to get it to work at all.

image

Any idea how to fix this? The device in question is the Atomberg Renesa+ link

tinglis1 commented 3 years ago

I had a similar issue with an Australian fan with six speeds. I slightly modified the fan.py file and had some success 7A1E6131-1DEC-4AD2-8AD4-EB08E19E6D0C

BED4B464-7A69-4F21-BFD6-64C28004A76B

ideally the whole fan.py file needs to brought inline with the new way of fan speed control.HA developer docs for climate devices

tinglis1 commented 3 years ago

Added a pull request as a quick fix.

411

milothomas commented 3 years ago

Thanks @tinglis1, I have made the changes to the fan.py in the interim until your PR is merged. Setting the speed as an integer between 0 and 6 (inclusive) works great. Setting via percentage is a bit wonky though.

rocksolid2018 commented 3 years ago

Thanks @tinglis1, I have made the changes to the fan.py in the interim until your PR is merged. Setting the speed as an integer between 0 and 6 (inclusive) works great. Setting via percentage is a bit wonky though.

i have 5 speed fan and unable to get fan speed to work. pls share the changes you made to the fan.py

milothomas commented 3 years ago

Thanks @tinglis1, I have made the changes to the fan.py in the interim until your PR is merged. Setting the speed as an integer between 0 and 6 (inclusive) works great. Setting via percentage is a bit wonky though.

i have 5 speed fan and unable to get fan speed to work. pls share the changes you made to the fan.py

Hey, I made the same changes as @tinglis1 see his PR here

rocksolid2018 commented 3 years ago

I have 5 speed Tuya fan regulator. Unable to control speed. Dont get many options while linking. Any direction [appreciated.]() Screenshot 2021-04-05 at 6 38 41 PM

tinglis1 commented 3 years ago

I have 5 speed Tuya fan regulator. Unable to control speed. Dont get many options while linking. Any direction appreciated. Screenshot 2021-04-05 at 6 38 41 PM

You need to change the low medium and high options to the speeds you want for those options. The old fan model only had those three speeds.

See my config below. B696924E-0312-4F30-980C-DC6ABE6ED681

tinglis1 commented 3 years ago

I have put a pull request in for updating to the new fan percentage configuration.

https://github.com/rospogrigio/localtuya/pull/542