So, states are string values. I don’t think is_state works that way. It should be a string comparison. Since 21 is not equal to ‘>0’, it should not do what you think.
Thanks!
I just changed ‘float’ to ‘int’ and ‘}}’ to ‘%}’ and it worked perfectly.
Now I’ll have to look up all those filters so I can understand what is happening
{% set ents = label_entities('Msg_grt_0') %}
{% set msg_grt0_ct = zip(ents, ents | map('states') | map('int', 0) | list)
| selectattr(1, 'gt', 0)
| map(attribute=1)
| list %}