mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-03 23:41:36 +01:00
Update lambda_magic.rst (#2822)
This commit is contained in:
parent
79e307f96d
commit
80aba4ad1d
@ -186,12 +186,15 @@ And in YAML:
|
|||||||
text_sensors:
|
text_sensors:
|
||||||
id: "uart_readline"
|
id: "uart_readline"
|
||||||
|
|
||||||
**Example usage**
|
.. _lambda_magic_uart_switch:
|
||||||
|
|
||||||
Here is an example switch using the uart text sensor to set switch state.
|
Custom UART Switch
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Here is an example switch using the uart text sensor above to set switch state.
|
||||||
|
|
||||||
Here we use interval to request status from the device. The response will be stored in uart text sensor.
|
Here we use interval to request status from the device. The response will be stored in uart text sensor.
|
||||||
Then the switch uses the text sensor state to set its own state.
|
Then the switch uses the text sensor state to publish its own state.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
@ -219,9 +222,9 @@ Then the switch uses the text sensor state to set its own state.
|
|||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
- :ref:`config-lambda`
|
||||||
|
- :ref:`automation`
|
||||||
- :doc:`/components/uart`
|
- :doc:`/components/uart`
|
||||||
- :doc:`/custom/uart`
|
- :doc:`/custom/uart`
|
||||||
- :ref:`lambda <config-lambda>`
|
|
||||||
- :ref:`automation`
|
|
||||||
|
|
||||||
- :ghedit:`Edit`
|
- :ghedit:`Edit`
|
||||||
|
Loading…
Reference in New Issue
Block a user