huangyupeng 9b9fdb4946 Add platform param (#6048)
* Add platform param

Add platform to distinguish accounts from different apps
The value could be 'tuya' or 'smart_life'. Default is 'tuya'.
related pull request is home-assistant/home-assistant#16058

* Minor fixes
2018-08-20 18:21:11 +02:00

1.7 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_iot_class, ha_release
layout title description date sidebar comments sharing footer logo ha_category ha_iot_class ha_release
page Tuya Instructions on how to setup the Tuya hub within Home Assistant. 2018-07-09 09:00 true false true true tuya.png Hub Cloud Polling 0.74

The tuya component is the main component to integrate all Tuya Smart related platforms. You will need your Tuya account information (username, password and account country code) to discover and control devices which related to your account.

{% linkable_title Configuration %}

To 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

{% configuration %} username: description: Your username to login to Tuya. This may be your phone number. required: true type: string password: description: Your password to login to Tuya. required: true type: string country_code: description: "Your account country code (e.g., 1 for USA or 86 for China)." required: true type: string platform: description: "The app where your account register. tuya for Tuya Smart and smart_life for Smart Life." required: false type: string default: tuya {% endconfiguration %}

{% linkable_title Service %}

These services are available for the tuya component:

  • force_update
  • pull_devices

Devices state data and new devices will refresh automatically. If you want to refresh all devices information or get new devices related to your account manually, you can call the force_update or pull_devices service.