Collection template functions

These template functions help you work with collections of data: lists, sets, dictionaries, and JSON. Use them to combine, filter, sort, and reshape data from your entities, API responses, and incoming messages.

Home Assistant extends the Jinja2 template engine with many custom functions, filters, and tests. Each function on this page has its own page with detailed descriptions, parameters, and practical examples.

New to templates? Start with the templating documentation to learn the basics.