mlock: faster user feedback

This commit is contained in:
neri 2024-07-16 21:50:11 +02:00
parent 0bf20c32c4
commit 8007a86bbf
1 changed files with 8 additions and 9 deletions

View File

@ -16,7 +16,7 @@ esphome:
platform: ESP8266
board: d1_mini
on_boot:
- priority: 600
- priority: 300
then:
- light.addressable_set: { id: status_led, red: 0%, green: 0%, blue: 100% }
- priority: -100
@ -81,17 +81,13 @@ rc522_spi:
cs_pin: GPIO15
on_tag:
then:
- light.addressable_set:
id: status_led
red: 100%
green: 100%
blue: 0%
- light.addressable_set: { id: status_led, red: 100%, green: 60%, blue: 0% }
# small delay so the light can update its color
- delay: 15ms
# 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);
id(may_switch_output) = 0;
# login to vault with role_id to fetch short lived token
- http_request.post:
url: https://vault.ctdo.de/v1/auth/approle/login
@ -172,6 +168,9 @@ rc522_spi:
- light.addressable_set: { id: status_led, red: 0%, green: 100%, blue: 0% }
else:
- light.addressable_set: { id: status_led, red: 100%, green: 0%, blue: 0% }
- text.set:
id: ${name_of_board}_letzter_token
value: !lambda return id(my_tag);
# switch component for the output state
switch: