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:
Andrea Donno 2020-12-13 16:46:22 +01:00 committed by GitHub
parent e680071505
commit 1329f67a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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