preheat_open.loadable_types.ComfortProfiles
- class preheat_open.loadable_types.ComfortProfiles(profiles=<factory>)
Bases:
LoadableDataTypeRepresents a collection of comfort profiles.
- __init__(profiles=<factory>)
Methods
__init__([profiles])add_data(data)Adds comfort profiles to the collection.
astimezone(tz)Converts the comfort profiles to the specified timezone.
get_data(date_range)Retrieves comfort profiles for the specified date range.
get_profile(id)Retrieves a comfort profile by ID.
Attributes
profiles- add_data(data)
Adds comfort profiles to the collection.
- Parameters:
data (ComfortProfiles) – The comfort profiles to add.
- Return type:
None
- astimezone(tz)
Converts the comfort profiles to the specified timezone.
- Parameters:
tz (tzinfo) – The timezone to convert to.
- Returns:
A ComfortProfiles object with the comfort profiles converted to the specified timezone.
- Return type:
- get_data(date_range)
Retrieves comfort profiles for the specified date range.
- Parameters:
date_range (DateRange) – The date range for which to retrieve comfort profiles.
- Returns:
A tuple containing the date range and the comfort profiles.
- Return type:
tuple[DateRange, ComfortProfiles]
- get_profile(id)
Retrieves a comfort profile by ID.
- Parameters:
id (int) – The ID of the comfort profile to retrieve.
- Returns:
The comfort profile with the specified ID.
- Return type: