mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-27 17:37:45 +01:00
fbc2fbbf15
* Add docs for Tuya binary sensor * Add tuya binary to index * Add link to tuya component * Fix label * update image link Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
35 lines
987 B
ReStructuredText
35 lines
987 B
ReStructuredText
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 <config-binary_sensor>`.
|
|
|
|
See Also
|
|
--------
|
|
|
|
- :doc:`/components/tuya`
|
|
- :doc:`/components/binary_sensor/index`
|
|
- :apiref:`tuya/binary_sensor/tuya_binary_sensor.h`
|
|
- :ghedit:`Edit`
|