How to reset Text Sensor?

Hello everyone, I need a little help because I just can’t get anywhere.
I use the Grow503 fingerprint sensor in Esphome. This works perfectly and when a finger is detected, esphome sets the value Authorized Finger in the text_sensor fingerprint state.

fingerprint_grow:
  password: xxxxx      # Existing password, can be omitted if it's the default of 0x00
  #new_password: xxxxx  # New password
  sensing_pin: GPIO05 # Or GPIO05 for ESP32
  on_finger_scan_matched:
    #- switch.turn_on: trigger_relay
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 200
        color: BLUE
        count: 1
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Authorized finger"
text_sensor:
  - platform: template
    id: fingerprint_state
    name: "Seitentür Fingerprint State"

How do I get the text_sensor to report, for example, – reset-- after it has reported Authorized Finger to Home Assistant for 5 seconds?

You could simply add a delay:

on_finger_scan_matched:
    #- switch.turn_on: trigger_relay
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 200
        color: BLUE
        count: 1
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Authorized finger"
    - delay: 5s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "— reset —"

Thats it! Thanks

The thing to remember about delay is that it’s non blocking. This mean that if the fingerprint sensor is triggered again during the 5 seconds, the actions will both continue running AND start again from the beginning.

A better way is to put the actions in a script, with mode restart, then call the script in the trigger.

Have a look at this link - may explain it better: