Floor template functions
These template functions let you work with floorsA floor in Home Assistant is a logical grouping of areas that are meant to match the physical floors in your home. Devices & entities are not assigned to floors but to areas. Floors can be used in automations and scripts as a target for actions. For example, to turn off all the lights on the downstairs floor when you go to bed. [Learn more] in Home Assistant. Look up floor names and IDs, find which 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] belong to a floor, and get all 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] across an entire floor.
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 areas on a floor
floor_areasReturns a list of area IDs that belong to a given floor. -
Get entities on a floor
floor_entitiesReturns a list of entity IDs for all entities on a given floor. -
Get floor ID
floor_idReturns the floor ID for a given floor name, area name, device ID, or entity ID. -
Get floor name
floor_nameReturns the friendly name of a floor from its ID, area name, device ID, or entity ID. -
Get all
floorsReturns a list of all floor IDs in your Home Assistant instance.