Tuya fan configuration

Where did you hear this? Local tuya is a custom Hacs Integration separate from the official tuya Integration. Local tuya also just released an update not that long ago. Things that are about to shutdown generally don’t receive updates.

No. The existing tuya integration is being replaced with the tuya v2 integration (which is currently in HACS). Local tuya is a third tuya integration, independent of tuya and tuya v2.

1 Like

I seem to remember seeing a thread somewhere that tuya was changing the API, but maybe that doesn’t affect local

@mwav3 can I PLEASE have your steps on how you accomplished this? This and some stupid iDoo/iRing doorbell (also a Tuya device) are the last of the integrations I need to get working in HA to finish my project that I promised my in-laws over a year ago that would have done in…well less time than over a year ago. All credit goes to you. I appreciate the time and effort it took you to figure it out and in an open community I will openly thank you as that is the best I can do.

Sincerely,

Some guy who is smart enough to know when he’s not smart enough.

Ok first I’m assuming you have the Tuya local security key for the fan. If you don’t, follow the directions here - https://github.com/codetheweb/tuyapi/blob/ab60e0d11fef6e9c4d73cd3f46bdda2a71f98f99/docs/SETUP.md

Once the local key is obtained, go to the integrations screen in Home Assistant, click “add integration”, then search for “local tuya”. Your device should appear in the next screen under a dropdown as a code with an IP address. The ID will match the id obtained from the TUYA developer website
Next, type a name for the device as you want it to be named in Home Assistant
Under “local key” - copy the key from the Tuya website
Next will be a dropdown for “add entity”. We’re going to add 3 entities - a fan, and two switches (one for light, one for the beep)
Add the fan first - see screenshot for mappings. ID 1 for on/off, 3 for speed. Change the speeds to 1, 2, and 3 for low, medium high:

Add switch next, uncheck “do not add more entities” We’re adding the light as a switch, NOT a light, since there is no dimmer and it is just on/off. The light is mapped to ID 9. Click submit when done:
Screenshot from 2021-10-08 09-03-59

This is optional to turn the beep on and off. If you want to control the beep, after you hit submit for the light, uncheck “do not add more entities”. Add as a switch mapped to id 17 for the beep:
Screenshot from 2021-10-08 09-04-16

When the 3 entities are added, leave the box for “do not add more entities” checked and hit submit. It will exit the configuration screen at that point and you will now have 3 entities - a fan to control the 3 speeds and on/off, a toggle for light on/off, and a toggle for beep on/off

5 Likes

Thanks for your help there Tim, saved me a lot of time with your easy to follow guide…quality! :+1::+1::grin::grin::grin::+1::+1:

Hi tim, thanks for the guide
How is the speed 1 & 2 on the fan?
Is it any slower than before installing the fan module?
I’m using sonoff ifan03 and the fan speed 1 & 2 are just too slow for me.
I’m considering getting the qiachip fan controller (also tuya) to try it out

The speed is noticeably slower for low and medium vs the factory fan low and medium with the Aubric, which is a common problem for a lot of these fan controllers.

I’ve read the newer sonoff ifan04 fixed the speed issue, and low and medium perform much better

1 Like

I see, then I’ll try the sonoff ifan04
I had some doubts getting that one

I tried changing the capacitors to match my original fan but that just made it slower

Then also i tried tuya fan controller (with wall fan switch) but that caused humming sound. Apparently something to do with PWM control

This Guide still works! I do not know how you figured this out but I’m glad you did. I’ve been trying to figure this out for the past 2 weeks!

I figured out the value in the parenthesis that shows when you configure it is what that value is currently on the device at that moment. So basically I would turn the light on and off, see what value changed, and then figured that ID number was the light (true = on, false =off). Same for the fan, and also the fan speeds. I just got a different fan controller that had a dimmer and the values were slightly different, so hope this helps if someone is trying to setup a tuya fan in the future and is trying to map the ID numbers to the entities.

1 Like