Control your TuyaCloud devices via Local Push in Home Assistant. This integration was thrown together fairly quickly in response to receiving some cheap Wi-Fi bulbs with the latest version of Tuya's firmware that cannot yet be flashed with Tasmota OTA.
Notice: This component currently only supports lights as I only have Tuya lights available to test with. I will be writing the integrations for these soon, but will be unable to test.
Notice: This component has only been tested with Tuya devices running firmware version 3.3. If you have devices you can test with, I encourage you to open an issue containing error logs or contribute directly with code 😁!
This integration makes use of my AIO Tuya library for communicating with these devices. I want to thank the following projects for their existing work at reverse engineering Tuya's protocols to make that library possible:
I also realize now there are some other custom components floating around that serve a similar purpose and have more devices tested and supported.
This integration requires your devices' device id and local key. You can read about retrieving that information here. I personally was able to retrieve this information by connecting the bulbs with an older version of the Smart Life app and pulling its preferences.xml using a rooted android phone.
- Add
https://github.com/zachcheatham/ha-tuya-local
as a custom integration repository to HACS. - Click install under "Tuya Local Component."
- Configure your devices and restart.
- Download the latest release as a ZIP
- Copy
/custom_components/tuya_local
to your Home Assistant<config_dir>/custom_components/
directory. - Configure your devices and restart.
light:
- platform: tuya_local
host: 192.168.1.43
device_id: 4324357afb43243
local_key: 587902facde43
version: 3.3
name: Front Porch Light
- platform: tuya_local
host: 192.168.1.44
device_id: 2311bdf24ac43e
local_key: 432901939458544ac
version: 3.3
name: Bath Light
- Support additional device types.
- Support light effect patterns.
- Test support of older firmware versions (I currently don't own any devices running < 3.3.)
- Support Home Assistant's config UI.
- Setup the logger component of Home Assistant to log debug messages from this component and related libraries:
logger:
default: info
logs:
custom_components.tuya_local: debug
aiotuyalan: debug
- Restart HA
- Retrieve your logs containing the related errors and open a issue in this repository.
- You can include logs using pastebin and include the link in your issue.
- Please include details of your Home Assistant enviornment.