make-all / tuya-local
Local support for Tuya devices in Home Assistant
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing make-all/tuya-local in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewHome Assistant Tuya Local component Please report any issues and feel free to raise pull requests. Many others have contributed their help already. This is a Home Assistant integration to support devices running Tuya firmware without going via the Tuya cloud. Devices are supported over WiFi, limited support for devices connected via hubs is available. Note that many Tuya devices seem to support only one local connection. If you have connection issues when using this integration, ensure that other integrations offering local Tuya connections are not configured to use the same device, mobile applications on devices on the local network are closed, and no other software is trying to connect locally to your Tuya devices. Using this integration does not stop your devices from sending status to the Tuya cloud, so this should not be seen as a security measure, rather it improves speed and reliability by using local connections, and may unlock some features of your device, or even unlock whole devices, that are not supported by the Tuya cloud API. A similar but unrelated integration is rospogrigio/localtuya, if your device is not supported by this integration, you may find it easier to set up using that as an alternative. --- Device support Note that devices sometimes get firmware upgrades, or incompatible versions are sold under the same model name, so it is possible that the device will not work despite being listed. Battery powered devices such as door and window sensors, smoke alarms etc which do not use a hub are not possible to support locally, due to the power management that they need to do to get acceptable battery life. In some cases that may also apply when a device that can be either battery or USB powered is plugged into USB. If you cannot gather Warning level logs with dps listed when attempting to set it up, then it will likely not work with this integration. Hubs are currently supported, but with limitations. Each connection to a sub device uses a separate network connection, but like other Tuya devices, hubs are usually limited in the number of connections they can handle, with typical limits being 1 or 3, depending on the specific Tuya module they are using. This severely limits the number of sub devices that can be connected through this integration. Sub devices should be added using the , and of the hub they are attached to, and the of the sub-device. If there is no listed, try using the instead. Tuya Zigbee devices are usually standard zigbee devices, so as an alternative to this integration with a Tuya hub, you can use a supported Zigbee USB stick or Wifi hub with ZHA or Zigbee2MQTT. Some Tuya Bluetooth devices can be supported directly by the tuya_ble integration. Tuya IR/RF blasters are supported through the remote entity platform. They can learn and store IR and RF commands, and replay them via the and services. Tuya IR hubs that expose general IR remotes as sub devices usually expose them as one way devices (send only). Due to the way this integration does device detection based on the dps returned by the device, it is not currently able to detect such devices at all. Some specialised IR hubs for air conditioner remote controls do work, as they try to emulate a fully smart air conditioner using internal memory of what settings are currently set, and internal temperature and humidity sensors. Some Tuya hubs now support Matter over WiFi, and this can be used as an alternative to this integration for connecting the hub and sub-devices to Home Assistant. Other limitations will apply to this, so you might want to try both, and only use this integration for devices that are not working properly over Matter. A list of currently supported devices can be found in the DEVICES.md file. Documentation on building a device configuration file is in /custom_components/tuya_local/devices/README.md If your device is not listed, you can find the information required to add a configuration for it in the following locations:• When attempting to add the device, if it is not supported, you will either get a message saying the device cannot be recognised at all, or you will be offered a list of devices that are partial matches. You can cancel the process at this point, and look in the Home Assistant log - there should be a message there containing the current data points (dps) returned by the device.• If you have signed up for iot.tuya.com, you should have access to the API Explorer under "Cloud". Under "Device Control" there is a function called "Query Things Data Model", which returns the dp id in addition to range information that is needed for integer and enum data types. If you file an issue to request support for a new device, please include the following information:• Identification of the device, such as model and brand name.• As much information on the datapoints you can gather using the above methods.• If manuals or webpages are available online, links to those help understand how to interpret the technical info above - even if they are not in English automatic translations can help, or information in them may help to identify identical devices sold under other brands in other countries that do have English or more detailed information available. If you submit a pull request, please understand that the config file naming and details of the configuration may get modified before release - for example if your name was too generic, I may rename it to a more specific name, or conversely if the device appears to be generic and sold under many brands, I may change the brand specific name to something more general. So it may be necessary to remove and re-add your device once it has been integrated into a release. --- Installation Installation is easiest via the Home Assistant Community Store (HACS), which is the best place to get third-party integrations for Home Assistant. Once you have HACS set up, simply click the button below (requires My Homeassistant configured…