list | map(f,arg]) generates a list by applying the function with the name f to every element of its input. It takes an element from the list as the first argument for f and the second from arg, so it generates [f(list[0],arg),f(list[1],arg),...]
Edit: Skipping the device_id altogether as suggested by @Didgeridrew is even better of course, but that’s how it would work to map to name form device id
Thank you for your answer!
That is the solution for my specific case. But just for interest and learning: Is there a kind of “value” keyword for piped lists/maps in Jinja?
I’m coming from Java/C#/Javascript, so honestly Jinja sometimes is kinda weird or at least unnecessary complex for me. But I guess it’s a philosophy thing.
Edit: I got the point that map('device_id') is calling the function device_id and passing the value entity_id(list results) as argument. Calling functions via String argument is definitely not part of my C-like philosophy.