# Rooms by Attribute

![](/files/-Miho2vBwKurFcDTXmTJ)

![](/files/-Miho-FLzaKXh5PnxyLj) - [\[source code\]](https://github.com/ladybug-tools/honeybee-grasshopper-core/blob/master/honeybee_grasshopper_core/src//HB%20Rooms%20by%20Attribute.py)

Separate and group honeybee Rooms by any attribute that the room possesses.

This can be used to group rooms by program, whether rooms are conditioned, etc.

### Inputs

* **rooms \[Required]**

An array of honeybee Rooms or honeybee Models to be separated and grouped based on their attributes.

* **attribute \[Required]**

Text for the name of the Room attribute with which the Rooms should be labeled. The Honeybee "Room Attributes" component lists all of the core attributes of the room. Also, each Honeybee extension (ie. Radiance, Energy) includes its own component that lists the Room attributes of that extension.

* **value**

An optional value of the attribute that can be used to filter the output rooms. For example, if the input attribute is "Program" a value for the name of a program can be plugged in here (eg. "2019::LargeOffice::OpenOffice") in order to get only the rooms that have this program assigned.

### Outputs

* **values**

A list of values with one attribute value for each branch of the output rooms.

* **rooms**

A data tree of honeybee rooms with each branch of the tree representing a different attribute value.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ladybug.tools/honeybee-primer/components/2_organize/rooms_by_attribute.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
