Skip to content

get_sensors.py§

get_sensors(state) §

Retrieve sensor information for the building structure.

Parameters:

Name Type Description Default
state State

The current state.

required

Returns:

Name Type Description
dict Dict[str, Any]

A dictionary containing sensor UUIDs mapped to their locations.

Source code in brickllm/nodes/get_sensors.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
def get_sensors(state: State) -> Dict[str, Any]:
    """
    Retrieve sensor information for the building structure.

    Args:
        state (State): The current state.

    Returns:
        dict: A dictionary containing sensor UUIDs mapped to their locations.
    """
    custom_logger.eurac("📡 Getting sensors information")

    uuid_dict = {
        "Building#1>Floor#1>Office#1>Room#1": [
            {
                "name": "Temperature_Sensor#1",
                "uuid": "aaaa-bbbb-cccc-dddd",
            },
            {
                "name": "Humidity_Sensor#1",
                "uuid": "aaaa-bbbb-cccc-dddd",
            },
        ],
        "Building#1>Floor#1>Office#1>Room#2": [
            {
                "name": "Temperature_Sensor#2",
                "uuid": "aaaa-bbbb-cccc-dddd",
            },
            {
                "name": "Humidity_Sensor#2",
                "uuid": "aaaa-bbbb-cccc-dddd",
            },
        ],
    }
    return {"uuid_dict": uuid_dict}