Tuya MCU

The tuya component creates a serial connection to the Tuya MCU for platforms to use.


The tuya serial component requires a UART bus to be configured. Put the tuya component in the config and it will list the possible devices for you in the config log.

# Example configuration entry
# Make sure your wifi will connect
  ssid: "ssid"
  password: "password"

# Make sure logging is not using the serial port
  baud_rate: 0

# Enable Home Assistant API

# Make sure you can upload new firmware OTA

  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600

# Register the Tuya MCU connection

Here is an example output for a Tuya fan controller:

[12:39:45][C][tuya:023]: Tuya:
[12:39:45][C][tuya:032]:   Datapoint 1: switch (value: ON)
[12:39:45][C][tuya:036]:   Datapoint 3: enum (value: 1)
[12:39:45][C][tuya:036]:   Datapoint 6: enum (value: 0)
[12:39:45][C][tuya:034]:   Datapoint 7: int value (value: 0)
[12:39:45][C][tuya:032]:   Datapoint 9: switch (value: OFF)
[12:39:45][C][tuya:046]:   Product: '{"p":"hqq73kftvzh8c92u","v":"1.0.0","m":0}'