Advertisement
captain380

Sample for people name

Apr 9th, 2024
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. text_sensor:
  2. - platform: template
  3. id: fingerprint_username
  4. name: "Who Scanned Last"
  5. update_interval: 30s
  6. #
  7. # Fingerprint matched - open/close the door
  8. #
  9. on_finger_scan_matched:
  10. - switch.turn_on: garage_door_relay
  11. - delay: 500ms
  12. - switch.turn_off: garage_door_relay
  13. - fingerprint_grow.aura_led_control:
  14. state: BREATHING
  15. speed: 200
  16. color: PURPLE
  17. count: 2
  18. - text_sensor.template.publish:
  19. id: fingerprint_state
  20. state: "Authorized finger"
  21. - lambda: |-
  22. if (finger_id == 0) {
  23. id(fingerprint_username).publish_state("Fred");
  24. } else if (finger_id == 1) {
  25. id(fingerprint_username).publish_state("Joan");
  26. } else {
  27. id(fingerprint_username).publish_state("Unknown");
  28. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement