logs reduced

This commit is contained in:
Philipp Wo 2023-04-18 01:12:32 +02:00
parent 4511924730
commit e298a28cc9
1 changed files with 16 additions and 7 deletions

View File

@ -318,10 +318,14 @@ fingerprint_grow:
speed: 200
color: GREEN
count: 1
- text_sensor.template.publish:
id: fingerprint_state
state: !lambda 'return "Authorized finger " + to_string(finger_id) + ", confidence " + to_string(confidence);'
# Pushing a tag_scanned event based on finger_id only if confidence is greater than 50
- lambda: |-
std::string fid = to_string(finger_id);
std::string conf = to_string(confidence);
const char * cfid = fid.c_str();
const char * cconf = conf.c_str();
ESP_LOGD("main", "Authorized finger %s, confidence %s", cfid, cconf );
# Pushing a tag_scanned event based on finger_id only if confidence is greater than ...
- if:
condition:
lambda: 'return confidence < 200;'
@ -334,15 +338,20 @@ fingerprint_grow:
payload: |-
root["finger_id"] = to_string(finger_id);
root["confidence"] = to_string(confidence);
root["msg"] = "Authorized finger " + to_string(finger_id) + ", confidence " + to_string(confidence);
on_finger_scan_unmatched:
- fingerprint_grow.aura_led_control:
state: FLASHING
speed: 25
color: RED
count: 2
- text_sensor.template.publish:
id: fingerprint_state
state: "Unauthorized finger"
- lambda: |-
ESP_LOGD("main", "Unauthorized finger");
- mqtt.publish_json:
topic: $devicename/finger/
qos: 1
payload: |-
root["msg"] = "Unauthorized finger";
on_enrollment_scan:
- fingerprint_grow.aura_led_control:
state: FLASHING