diff --git a/components/binary_sensor/tuya.rst b/components/binary_sensor/tuya.rst new file mode 100644 index 000000000..ab6489af2 --- /dev/null +++ b/components/binary_sensor/tuya.rst @@ -0,0 +1,34 @@ +Tuya Binary Sensor +================== + +.. seo:: + :description: Instructions for setting up a Tuya device binary sensor. + +The ``tuya`` binary sensor platform creates a binary sensor from a +tuya component and requires :doc:`/components/tuya` to be configured. + +You can create the binary sensor as follows: + +.. code-block:: yaml + + # Create a binary sensor + binary_sensor: + - platform: "tuya" + name: "MyBinarySensor" + sensor_datapoint: 1 + +Configuration variables: +------------------------ + +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- **name** (**Required**, string): The name of the binary sensor. +- **sensor_datapoint** (**Required**, int): The datapoint id number of the binary sensor. +- All other options from :ref:`Binary Sensor `. + +See Also +-------- + +- :doc:`/components/tuya` +- :doc:`/components/binary_sensor/index` +- :apiref:`tuya/binary_sensor/tuya_binary_sensor.h` +- :ghedit:`Edit` diff --git a/index.rst b/index.rst index bdc52db6e..579610d4f 100644 --- a/index.rst +++ b/index.rst @@ -187,6 +187,7 @@ Binary Sensor Components PN532, components/binary_sensor/pn532, pn532.jpg RDM6300, components/binary_sensor/rdm6300, rdm6300.jpg TTP229, components/binary_sensor/ttp229, ttp229.jpg + Tuya Binary Sensor, components/binary_sensor/tuya, tuya.png Custom Binary Sensor, components/binary_sensor/custom, language-cpp.svg Output Components