From 5b173917beefa134304dcecf77eb7bce8e348bba Mon Sep 17 00:00:00 2001 From: neri Date: Tue, 9 Jul 2024 19:25:42 +0200 Subject: [PATCH] feat: report last scanned token to home assistant --- mlock-common.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mlock-common.yaml b/mlock-common.yaml index 0ac5da7..51f45b6 100644 --- a/mlock-common.yaml +++ b/mlock-common.yaml @@ -91,6 +91,10 @@ rc522_spi: # store the tag id into global variable - lambda: |- id(my_tag) = x; + - text.set: + id: ${name_of_board}_letzter_token + value: !lambda return id(my_tag); + - delay: 2s # login to vault with role_id to fetch short lived token - http_request.post: url: https://vault.ctdo.de/v1/auth/approle/login @@ -225,3 +229,10 @@ text: id: ${name_of_board}_letzte_entsperrung optimistic: true mode: text + +text: + - platform: template + name: "$name_of_board Zuletzt Gelesener Token" + id: ${name_of_board}_letzter_token + optimistic: true + mode: text