mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-04 23:52:18 +01:00
add another example without MQTT (#573)
* add another example without MQTT this has been requested on Twitter so I thought it might be helpful for further users * Minor changes * Remove second anchor Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
This commit is contained in:
parent
e680071505
commit
1329f67a24
@ -97,6 +97,24 @@ using :ref:`api-homeassistant_tag_scanned_action`.
|
||||
then:
|
||||
- homeassistant.tag_scanned: !lambda 'return x;'
|
||||
|
||||
Alternatively you could also send the value directly to Home Assistant via a
|
||||
:doc:`template sensor </components/sensor/template>`.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
pn532:
|
||||
# ...
|
||||
on_tag:
|
||||
then:
|
||||
- text_sensor.template.publish:
|
||||
id: rfid_tag
|
||||
state: !lambda 'return x;'
|
||||
|
||||
text_sensor:
|
||||
- platform: template
|
||||
name: "RFID Tag"
|
||||
id: rfid_tag
|
||||
|
||||
.. _pn532-tag:
|
||||
|
||||
NFC/RFID Tag
|
||||
|
Loading…
Reference in New Issue
Block a user