mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-10-14 08:35:12 +02:00
OpenPrintTag reader: send the tag record to Home Assistant
esphome.openprinttag event with the uid and the raw record (empty when the tag is removed) for the OpenPrintTag integration (randybb/ha-openprinttag).
This commit is contained in:
1 parent
b8f8649833
commit
9eb5cd9155
1 file changed
+12
@@ -78,7 +78,19 @@ pn5180:
|
|||||||
then:
|
then:
|
||||||
- rtttl.play: "success:d=24,o=5,b=100:c,g,b"
|
- rtttl.play: "success:d=24,o=5,b=100:c,g,b"
|
||||||
- homeassistant.tag_scanned: !lambda return x;
|
- homeassistant.tag_scanned: !lambda return x;
|
||||||
|
# Raw tag record for the OpenPrintTag integration (randybb/ha-openprinttag)
|
||||||
|
on_openprinttag:
|
||||||
|
- homeassistant.event:
|
||||||
|
event: esphome.openprinttag
|
||||||
|
data:
|
||||||
|
uid: !lambda return uid;
|
||||||
|
payload: !lambda return payload;
|
||||||
on_tag_removed:
|
on_tag_removed:
|
||||||
|
- homeassistant.event:
|
||||||
|
event: esphome.openprinttag
|
||||||
|
data:
|
||||||
|
uid: !lambda return x;
|
||||||
|
payload: ""
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: buzzer_enabled
|
switch.is_on: buzzer_enabled
|
||||||
|
|||||||
Reference in new issue
Block a user