diff --git a/components/binary_sensor/sdl.rst b/components/binary_sensor/sdl.rst new file mode 100644 index 000000000..842f6dcb8 --- /dev/null +++ b/components/binary_sensor/sdl.rst @@ -0,0 +1,29 @@ +SDL Binary Sensor +================= + +.. seo:: + :description: Instructions for setting up an SDL keyboard binary sensor. + +The ``sdl`` binary sensor platform creates a binary sensor from keyboard presses on the host platform. +The sensor will be true when the key is pressed. + +Configuration variables: +------------------------ + +- **key** (**Required**): The ID of an `SDL key `_. +- All other variables from :ref:`Binary Sensor `. + +Example: + +.. code-block:: yaml + + binary_sensor: + - platform: sdl + id: key_id + key: SDLK_a + +See Also +-------- +- :doc:`Host Platform ` +- :ref:`SDL display ` +- :ghedit:`Edit` diff --git a/components/display/sdl.rst b/components/display/sdl.rst index 3e30ad60c..6bd5974cb 100644 --- a/components/display/sdl.rst +++ b/components/display/sdl.rst @@ -100,6 +100,7 @@ See Also -------- - :ref:`SDL touchscreen ` +- :doc:`SDL binary sensor ` - :doc:`index` - :apiref:`sdl/sdl_esphome.h` - :ghedit:`Edit` diff --git a/index.rst b/index.rst index 19f9cb9c9..e9b4cfecc 100644 --- a/index.rst +++ b/index.rst @@ -652,6 +652,7 @@ Core Home Assistant, components/binary_sensor/homeassistant, home-assistant.svg, dark-invert Status, components/binary_sensor/status, server-network.svg, dark-invert Switch, components/binary_sensor/switch, electric-switch.svg, dark-invert + Host SDL2, components/binary_sensor/sdl, sdl.png Capacitive Touch ****************