wifi:
  ssid: MySSID
  password: password1

uart:
  - id: uart_tuya
    tx_pin: 4
    rx_pin: 5
    baud_rate: 9600

tuya:
  status_pin:
    number: 6
    inverted: true
  on_datapoint_update:
    - sensor_datapoint: 6
      datapoint_type: raw
      then:
        - logger.log: Datapoint 6 updated

binary_sensor:
  - platform: tuya
    id: tuya_binary_sensor
    sensor_datapoint: 1

climate:
  - platform: tuya
    id: tuya_climate
    switch_datapoint: 1
    target_temperature_datapoint: 3
    current_temperature_multiplier: 0.5
    target_temperature_multiplier: 0.5
    reports_fahrenheit: true

cover:
  - platform: tuya
    id: tuya_cover
    position_datapoint: 2

light:
  - platform: tuya
    id: tuya_light
    switch_datapoint: 1
    dimmer_datapoint: 2
    min_value_datapoint: 3
    color_temperature_datapoint: 4
    min_value: 1
    max_value: 100
    cold_white_color_temperature: 153 mireds
    warm_white_color_temperature: 500 mireds
    gamma_correct: 1

number:
  - platform: tuya
    id: tuya_number
    number_datapoint: 102
    min_value: 0
    max_value: 17
    step: 1

select:
  - platform: tuya
    id: tuya_select
    enum_datapoint: 42
    options:
      0: Internal
      1: Floor
      2: Both

sensor:
  - platform: tuya
    id: tuya_sensor
    sensor_datapoint: 1

switch:
  - platform: tuya
    id: tuya_switch
    switch_datapoint: 1