Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- binary_sensor tensor:
- - platform: template
- sensors:
- person:
- friendly_name: 'Person'
- value_template: >
- {% set ns = namespace(found=false) %}
- {% if states.image_processing.tensorflow_wjazd.attributes.matches.person or
- states.image_processing.tensorflow_wejscie.attributes.matches.person %}
- {% for persons in states.image_processing.tensorflow_wjazd.attributes.matches.person %}
- {% if persons.score >= "92"|float %}
- {% set ns.found = true %}
- {% endif %}
- {% endfor %}
- {% for persons in states.image_processing.tensorflow_wejscie.attributes.matches.person %}
- {% if persons.score >= "92"|float %}
- {% set ns.found = true %}
- {% endif %}
- {% endfor %}
- {% endif %}
- {{ ns.found }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement