publish finger ID and confidence to mqqt

This commit is contained in:
Philipp Wo 2023-04-17 00:24:04 +02:00
parent c7940f8a50
commit 0824ee261a
1 changed files with 11 additions and 3 deletions

View File

@ -174,9 +174,11 @@ mqtt:
}
- mqtt.publish_json:
topic: $devicename/led/
qos: 1
#retain: true
payload: |-
root["led_state"] = id(led_state).state;
root["color"] = x["color"];
root["color"] = id(led_color).state;
# Fingerpint functions
@ -335,10 +337,16 @@ fingerprint_grow:
# Pushing a tag_scanned event based on finger_id only if confidence is greater than 50
- if:
condition:
lambda: 'return confidence > 50;'
lambda: 'return confidence < 200;'
then:
- logger.log: "Matched höher 50"
- logger.log: "Known finger found"
# todo - push confidence and finger ID to MQTT
- mqtt.publish_json:
topic: $devicename/finger/
qos: 1
payload: |-
root["finger_id"] = to_string(finger_id);
root["confidence"] = to_string(confidence);
on_finger_scan_unmatched:
- fingerprint_grow.aura_led_control:
state: FLASHING