preheat_open.location.Location
- class preheat_open.location.Location(id=None, information=None, zones=None, units=None, characteristics=None, supply_points=None, adapter=None, comfort_profiles=None)
Bases:
objectRepresents a location in the PreHEAT sense.
- Variables:
id (Optional[int]) – The unique identifier of the location.
information (LocationInformation) – The information of the location.
zones (list[Zone]) – A list of zones associated with the location.
units (list[Unit]) – A list of units associated with the location.
characteristics (LocationCharacteristics) – The characteristics of the location.
supply_points (list[SupplyPoint]) – A list of supply points associated with the location.
_device_query_type (Query) – The query type for devices.
__devices (list[Device]) – A list of devices associated with the location.
__devices_loaded (bool) – Indicates if the devices have been loaded.
adapter (Adapter) – The adapter for the location.
comfort_profiles (list[ComfortProfile]) – A list of comfort profiles associated with the location.
- __init__(id=None, information=None, zones=None, units=None, characteristics=None, supply_points=None, adapter=None, comfort_profiles=None)
Methods
__init__([id, information, zones, units, ...])from_building_model_dict(data, adapter)Creates a Location object from a building model dictionary.
get_comfort_profiles(date_range)Retrieves comfort profiles for the location within the specified time range.
get_components([query])Retrieves components associated with the location.
get_devices([query])Retrieves devices associated with the location.
get_measurements(**kwargs)Retrieves measurements for the location.
get_units([query])Retrieves units associated with the location.
get_zones([query])Retrieves zones associated with the location.
Converts the location to a building model dictionary.
Attributes
Returns the adapter associated with the location.
Returns the list of devices associated with the location.
Returns the timezone of the location.
- property adapter: Adapter
Returns the adapter associated with the location.
- Returns:
The adapter for the location.
- Return type:
- property devices: list[preheat_open.unit.Device]
Returns the list of devices associated with the location.
- Returns:
A list of devices.
- Return type:
list[Device]
- classmethod from_building_model_dict(data, adapter)
Creates a Location object from a building model dictionary.
- Return type:
- get_comfort_profiles(date_range)
Retrieves comfort profiles for the location within the specified time range.
- Parameters:
date_range (DateRange) – The date range for the comfort profiles.
- Returns:
A list of comfort profiles.
- Return type:
list[ComfortProfile]
- get_components(query=None, **kwargs)
Retrieves components associated with the location.
- get_devices(query=None, **kwargs)
Retrieves devices associated with the location.
- get_measurements(**kwargs)
Retrieves measurements for the location.
- Parameters:
- Returns:
A DataFrame containing the measurements.
- Return type:
pd.DataFrame
- get_units(query=None, **kwargs)
Retrieves units associated with the location.
- get_zones(query=None, **kwargs)
Retrieves zones associated with the location.
- property timezone: tzinfo
Returns the timezone of the location.
- Returns:
The timezone of the location.
- Return type:
tzinfo
- to_building_model_dict()
Converts the location to a building model dictionary.
- Returns:
A dictionary containing the location information.
- Return type:
dict