Help requested for templating, count "idle" generic_camera entities

Hi, I am requesting help for a template to count state=“idle” generic_camera entities.
I can list these using
{{ integration_entities(‘generic’) }}
but I am struggling to filter and count by state.
Thank you!

{{ integration_entities('generic')|select('is_state', 'idle')|list|count }}
1 Like

Thank you, this is perfect!