Area template functions
These template functions let you work with the areas you’ve set up in Home Assistant. Look up which entities or devices belong to an area, get area names and IDs, and build automations that operate on entire rooms at once.
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.
-
Get devices in an area
area_devicesReturns a list of device IDs associated with a given area. -
Get entities in an area
area_entitiesReturns a list of entity IDs associated with a given area. -
Get area ID
area_idReturns the area ID for a given area name, entity ID, or device ID. -
Get area name
area_nameReturns the friendly name of an area from its ID, entity ID, or device ID. -
Get all
areasReturns a list of all area IDs in your Home Assistant instance.