Update lambda_magic.rst (#2822)

This commit is contained in:
H. Árkosi Róbert 2023-04-12 14:04:54 +02:00 committed by GitHub
parent 79e307f96d
commit 80aba4ad1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -186,12 +186,15 @@ And in YAML:
text_sensors:
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.
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
@ -219,9 +222,9 @@ Then the switch uses the text sensor state to set its own state.
See Also
--------
- :ref:`config-lambda`
- :ref:`automation`
- :doc:`/components/uart`
- :doc:`/custom/uart`
- :ref:`lambda <config-lambda>`
- :ref:`automation`
- :ghedit:`Edit`