Neoback45
(Jouan)
December 25, 2023, 3:35pm
1
Hello,
I want create template with attribut for this:
state: "{{ state_attr('image_processing.platerecognizer_synologyds220_visiophone_hikvision', 'vehicles')}}
And i want just « plate »
What is the correct sintax ?
state: "{{ state_attr('image_processing.platerecognizer_synologyds220_visiophone_hikvision', 'vehicles', ‘plate’)}}
Not correct…
Thanks
For just the first recognized plate it would be:
state: "{{ state_attr('image_processing.platerecognizer_synologyds220_visiophone_hikvision', 'vehicles')[0]['plate'] }}"
Though you may want to incorporate a sort to show the highest confidence in cases where multiple plates are captured.
state: |
{{ state_attr('image_processing.platerecognizer_synologyds220_visiophone_hikvision', 'vehicles')
| sort(attribute='confidence', reverse=true) | map(attribute='plate') | first }}