mlock: faster user feedback
This commit is contained in:
parent
0bf20c32c4
commit
8007a86bbf
|
@ -16,7 +16,7 @@ esphome:
|
||||||
platform: ESP8266
|
platform: ESP8266
|
||||||
board: d1_mini
|
board: d1_mini
|
||||||
on_boot:
|
on_boot:
|
||||||
- priority: 600
|
- priority: 300
|
||||||
then:
|
then:
|
||||||
- light.addressable_set: { id: status_led, red: 0%, green: 0%, blue: 100% }
|
- light.addressable_set: { id: status_led, red: 0%, green: 0%, blue: 100% }
|
||||||
- priority: -100
|
- priority: -100
|
||||||
|
@ -81,17 +81,13 @@ rc522_spi:
|
||||||
cs_pin: GPIO15
|
cs_pin: GPIO15
|
||||||
on_tag:
|
on_tag:
|
||||||
then:
|
then:
|
||||||
- light.addressable_set:
|
- light.addressable_set: { id: status_led, red: 100%, green: 60%, blue: 0% }
|
||||||
id: status_led
|
# small delay so the light can update its color
|
||||||
red: 100%
|
- delay: 15ms
|
||||||
green: 100%
|
|
||||||
blue: 0%
|
|
||||||
# store the tag id into global variable
|
# store the tag id into global variable
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(my_tag) = x;
|
id(my_tag) = x;
|
||||||
- text.set:
|
id(may_switch_output) = 0;
|
||||||
id: ${name_of_board}_letzter_token
|
|
||||||
value: !lambda return id(my_tag);
|
|
||||||
# login to vault with role_id to fetch short lived token
|
# login to vault with role_id to fetch short lived token
|
||||||
- http_request.post:
|
- http_request.post:
|
||||||
url: https://vault.ctdo.de/v1/auth/approle/login
|
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% }
|
- light.addressable_set: { id: status_led, red: 0%, green: 100%, blue: 0% }
|
||||||
else:
|
else:
|
||||||
- light.addressable_set: { id: status_led, red: 100%, green: 0%, blue: 0% }
|
- 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 component for the output state
|
||||||
switch:
|
switch:
|
||||||
|
|
Loading…
Reference in New Issue