In today’s video I will show you how to control Tuya devices from Home Assistant. I’ll use this 4 inch WiFi RGBW Led Downlight from Zemismart, but you can use the same approach for any Tuya compatible device out there.

Let’s start with some basic questions like:

What is Tuya?

This is an IoT platform that enables brands and manufacturers to provide one common solution for their clients to control their products remotely.

In other words if you see on a product that is Tuya compatible, that means you can control that product with your phone via TuyaSmart application. This application can be found for free in your smart phone store.

Why to integrate Tuya devices with Home Assistant?

You may ask yourself why should I care to integrate a Tuya device with Home Assistant when I can use the TuyaSmart app? And this is pretty reasonable question. But at the end of the day you may want (at least I do) to have all of your smart devices in one place, so you can make better scenes and automations.

For example: If you have smart devices from different brands like Philips, Samsung, Ikea, Sonoff, Shelly and so on and so on it is a lot better to control them all from one hub like Home Assistant.

So, I will demonstrate you step by step how to Integrate this Zemismart Downlight which is Tuya compatible with Home Assistant.

And if you watch the video till the end you will learn how to use the same method for any Tuya compatible: Fan, Light, Cover, Switch, Air Conditioner or Heater.

So without further ado lets go to the Requirements:

Requirements:

To complete this tutorial you will need:

  • Smashed Like button for the YouTube algorithm, but really it takes only 2 seconds.
  • Any Tuya compatible device like this nice Zemismart Downlight – https://amzn.to/2SpJE4P
  • Working Home Assistant – but if you still don’t have it check this video article
  • TuyaSmart app installed (from your mobile phone sore) with added some Tuya devices inside.

Steps

In Configuration file:

You will need your Tuya account information (username, password and account country code) to discover and control your devices.

Your account country code, e.g., 1 for USA or 86 for China, again enquoted. https://www.countrycode.org/

Add your Tuya devices into your Home Assistant installation, add the following to your configuration.yaml file:

 tuya: 
   username: YOUR_TUYA_USERNAME 
   password: YOUR_TUYA_PASSWORD 
   country_code: YOUR_ACCOUNT_COUNTRYCODE 

Then restart your Home Assistant

In Home Assistant Interface:

To add the device on your Home Assistant Dashboard – create a card by clicking on “Configure UI” in the upper right corner.

Then click on the “+” button in the lower right corner and choose “ENTITIES” or “LIGHT” card.

Home Assistant Create New Card Dialog
Home Assistant Create New Card Dialog

After that choose your Tuya device in the “Entity” dropdown menu and click “Save”.

You can also go to Developer tools > Services and add the following to make the lamp glow red with very high brightness.

Home Assistant Developer Tools - making the downlight to glow red
Home Assistant Developer Tools – making the downlight to glow red

The Home Assistant integration with the Tuya compatible Zemismart Downlight is completed and it is working very well.

Question?

This is my first Tuya compatible device in my house and I wonder do you have any Tuya devices in your home already? If yes, are you happy with them? Or maybe you are planning to buy something?

Let me know your thoughts in the comments below and I will promise to respond you back.

I will show you very quickly how this downlight is working with the TuyaSmart app

Support my work:

Any sort of engagement on this site or YouTube channel does really help out a lot with the YouTube algorithm. So make sure you hit the subscribe, Like and Bell buttons If you enjoy this video.

Also feel free to add me on Twitter by searching for @KPeyanski.

I really hope that you find this information useful and you now can control Tuya compatible devices like this Zemismart Downlight from Home Assistant.

Thank you for watching/reading, stay safe and see you next time.


12 Comments

Olijk · 06/03/2020 at 11:49 am

Hi thanks for the info.
I have a Gosund switch which is similar/equal to the Tuya. I can do the switching with HomeAssistant. I works fine.
However, my model is SP111 and that measures also the energy consumption. This is not visible in HA, only the switch function.
Is there any way to get the readings? It would be great.
NB I also have a switch of Meross that also measures the energy consumption. That one works fine as switch and gives also energy consumption in HA

Thanks.

Ash · 26/04/2020 at 7:20 am

Кирил, а что скажешь на счет подключения Tuya Hub к Home Assistant? У меня работает Home Assistant на Raspberry Pi 4. Я думаю, можно ли прикрутить Tuya Hub к нему, чтобы использовать Aqara ZigBee сенсоры и датчики?

Ritson Matos · 20/06/2020 at 7:30 pm

The integration was working perfectly until a week ago when it started showing the following error: “Updating tuya switch took longer than the scheduled update interval 0:00:30”. The status does not remain after the change even if the command is executed. Any idea?

Jason · 28/06/2020 at 10:05 pm

My logs show that the tuya option is now deprecated. Any other options?

    Kiril Peyanski · 29/06/2020 at 11:20 am

    Hi Jason, try the new way from Home Assistant -> Configuration -> Integrations, click the button with + sign and from the list of integrations select Tuya.

Bagira · 13/07/2020 at 2:09 pm

Hi Kiril!
My devices are configured through Tuya integration. Unfortunately, when using the switches, the status change or their display takes place quite late. Do you have any idea about the problem?

Fredrik · 15/07/2020 at 1:00 pm

Hi, thanks for all your work!
I have a problem with tuya smartlife devices integrated to HA thrue custom tuya component. The log is flooded by this message: Updating tuya_custom switch took longer than the scheduled update interval 0:00:15
Any idea on whats not working? (the switches is sometimes working instant but sometimes delay of 15-30s)
Thanks // Fredrik

Angelo Marcelo · 31/08/2020 at 7:01 pm

Hello, fascinate your work, congratulations !! I am buying a Tuya Smart Lock. Do you believe if I can join the home assistant?

    Kiril Peyanski · 31/08/2020 at 11:35 pm

    Yes, it should work. Good luck! And thank you for the good words!

      Benjamin Geißler · 21/09/2020 at 3:50 pm

      But the tuya integration does not works with lock, or?

        Kiril Peyanski · 21/09/2020 at 4:56 pm

        As far as I know – yes, lock is not supported in Tuya integration for Home Assistant at this moment.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.