[Solved] Template sensor to read dynamically nested attribute information

Alternatively, if you’re looking for the best score only if it’s a person… This should always work. This data looks like tensorflow, so it should always have summary.

{% set matches = state_attr('image_processing.doods_side_yard', 'matches') %}
{% if matches and matches.summary.person | default(0) > 0 %}
  {{ matches.matches.person | map(attribute='score') | list | max }}
{% else %}
  No People
{% endif %}

However, be forewarned… Tensorflow is being deprecated and removed. I’ve personally removed it. I suggest moving to the custom addon frigate. Much better solution too.

Thank you both so much, this is actually for the DOODS Add-on, but yea operatively pretty much just like Tensorflow… it should work perfectly and I only detect people so I think I’ll be ok with the first example.
I’ve just been trying to fine tune my confidence level to get rid of false positives but it is a pain to have to go to each Image and zoom in on the box to determine the percentage… I’m hoping with a charted value I can better adjust my cameras to catch the most people without the false positives (at night mostly). (I also apparently missed a person on two cameras yesterday because I recently set my confidence too high)
Thank you both again and I will give this a shot when I get home tonight.

Just made the first sensor and seems to be working perfectly thank you.

Quick question about this, if I remember correctly you used to use TensorFlow, how do you feel Frigate accuracy is compared to Tensorflow? (And also processor usage) I simply picked the Doods Add-On because I had used that temporarily the last time Tensorflow was broken… so I still had the settings commented out in my YAML… do you think it is worth the effort of switching over?

Frigate is worlds better than anything I have tried so far

1 Like

And just to share the fruits of your labor… I also now added that value to my notifications which is even easier than going to look at the entities history… thanks again guys.

1 Like