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