I’m trying to configure an automation for my Netatmo Welcome indoor camera. The trigger and action work: it sends me a notification with the name of the known face detected. However, now I want to only send a notification if the name is ‘John’. This is where I struggle as I cannot get the condition to work. It’s probably easy, but I just started with HA and am completely new to coding.
Hi, I try this condition in an automation, the code returns the values of true or false in “tools for developers” → “models”, but if I do the verification, it gives me an error in the notifications.
This is the code:
- id: riconoscimento_facciale
alias: riconoscimento_facciale
trigger:
- platform: event
event_type: image_processing.detect_face
event_data:
entity_id: image_processing.volti_riconosciuti
condition:
condition: template
value_template: '{{ ((states.image_processing.volti_riconosciuti.attributes.faces[0].confidence) | int) > 90 }}'
action:
- service: notify.giuliano_tel
data:
message: Ho riconosciuto la persona
title: Riconoscimento facciale
mode: single