esphome-docs/components/binary_sensor/nextion.rst

43 lines
1.3 KiB
ReStructuredText
Raw Normal View History

2018-08-24 22:44:01 +02:00
Nextion Touch Component
=======================
2018-11-14 22:12:27 +01:00
.. seo::
:description: Instructions for setting up Nextion touch binary sensors.
:image: nextion.jpg
2018-08-24 22:44:01 +02:00
The ``nextion`` binary sensor platform lets you track when a component on the display is
touched or not. The binary sensor will turn on when the component with the given component and page id is
pressed on, and will turn off as soon as the finger is released.
See :doc:`/components/display/nextion` for setting up the display
2018-08-24 22:44:01 +02:00
.. code-block:: yaml
2018-08-24 22:44:01 +02:00
# Example configuration entry
display:
- platform: nextion
# ...
binary_sensor:
- platform: nextion
page_id: 0
component_id: 2
2018-08-27 13:21:30 +02:00
name: "Nextion Component 2 Touch"
2018-08-24 22:44:01 +02:00
Configuration variables:
------------------------
- **name** (**Required**, string): The name of the binary sensor.
- **page_id** (**Required**, int): The ID of the page the component is on. Use ``0`` for the default page.
- **component_id** (**Required**, int): The ID (the number, not name!) of the component to track.
- **nextion_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the Nextion display.
2019-02-17 12:28:17 +01:00
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
2018-08-24 22:44:01 +02:00
See Also
--------
- :doc:`/components/display/nextion`
2018-08-24 22:44:01 +02:00
- :doc:`index`
2019-05-12 22:44:59 +02:00
- :apiref:`nextion/nextion.h`
- :ghedit:`Edit`