Label template functions

These template functions let you work with labelsLabels in Home Assistant allow grouping elements irrespective of their physical location or type. Labels can be assigned to areas, devices, entities, automations, scenes, scripts, and helpers. Labels can be used in automations and scripts as a target for actions. Labels can also be used to filter data. [Learn more] in Home Assistant. Labels are tags you can assign to entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more], devicesA device is a model representing a physical or logical unit that contains entities., and areasAn area in Home Assistant is a logical grouping of devices and entities that are meant to match areas (or rooms) in the physical world: your home. For example, the living room area groups devices and entities in your living room. [Learn more] to organize them. Use these functions to look up labels, find items with specific labels, and build automationsAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more] that act on labeled groups of items.

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.