As I’m new to all this and trying to wrap my head around things. I’m making my way through the documentation. ‘templating’ features plenty of code examples, which is great but it would be very useful if those examples displayed examples of the outputs.
{{ expand(['device_tracker.paulus', 'group.child_trackers'])
| selectattr("attributes.battery", 'defined')
| join(', ', attribute="attributes.battery") }}
This would greatly help to understand exactly what is happening in the code.