SHARE
TWEET

Untitled

a guest Mar 26th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. binary_sensor tensor:
  2.    - platform: template
  3.      sensors:
  4.        person:
  5.          friendly_name: 'Person'
  6.          value_template: >
  7.           {% set ns = namespace(found=false) %}
  8.            {% if states.image_processing.tensorflow_wjazd.attributes.matches.person or
  9.                  states.image_processing.tensorflow_wejscie.attributes.matches.person %}
  10.              {% for persons in states.image_processing.tensorflow_wjazd.attributes.matches.person %}
  11.                {% if persons.score >= "92"|float %}
  12.                  {% set ns.found = true %}
  13.                {% endif %}
  14.              {% endfor %}
  15.              {% for persons in states.image_processing.tensorflow_wejscie.attributes.matches.person %}
  16.                {% if persons.score >= "92"|float %}
  17.                  {% set ns.found = true %}
  18.                {% endif %}
  19.              {% endfor %}
  20.            {% endif %}
  21.            {{ ns.found }}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top