mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-24 22:02:04 +01:00
docs for new switch binary sensor (#4465)
Co-authored-by: Samuel Sieb <samuel@sieb.net> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
4a4d0ae752
commit
8a8e1edbd4
36
components/binary_sensor/switch.rst
Normal file
36
components/binary_sensor/switch.rst
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
.. _switch-binary-sensor:
|
||||||
|
|
||||||
|
Switch Binary Sensor
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. seo::
|
||||||
|
:description: Instructions for setting up switch binary sensors with ESPHome.
|
||||||
|
|
||||||
|
The Switch Binary Sensor platform allows you to view the state of any switch component as a
|
||||||
|
read-only binary sensor.
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# Example configuration entry
|
||||||
|
binary_sensor:
|
||||||
|
- platform: switch
|
||||||
|
name: "Output state"
|
||||||
|
source_id: relay1
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
id: relay1
|
||||||
|
pin: GPIOXX
|
||||||
|
|
||||||
|
Configuration variables:
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
- **source_id** (**Required**, :ref:`config-id`): The source switch to observe.
|
||||||
|
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
|
||||||
|
|
||||||
|
See Also
|
||||||
|
--------
|
||||||
|
|
||||||
|
- :doc:`/components/binary_sensor/index`
|
||||||
|
- :apiref:`switch/binary_sensor/switch_binary_sensor.h`
|
||||||
|
- :ghedit:`Edit`
|
@ -637,6 +637,7 @@ Core
|
|||||||
GPIO, components/binary_sensor/gpio, gpio.svg
|
GPIO, components/binary_sensor/gpio, gpio.svg
|
||||||
Home Assistant, components/binary_sensor/homeassistant, home-assistant.svg, dark-invert
|
Home Assistant, components/binary_sensor/homeassistant, home-assistant.svg, dark-invert
|
||||||
Status, components/binary_sensor/status, server-network.svg, dark-invert
|
Status, components/binary_sensor/status, server-network.svg, dark-invert
|
||||||
|
Switch, components/binary_sensor/switch, electric-switch.svg, dark-invert
|
||||||
|
|
||||||
Capacitive Touch
|
Capacitive Touch
|
||||||
****************
|
****************
|
||||||
|
Loading…
Reference in New Issue
Block a user