6.1.33.1 Methods Defined Here
get_data() -> profile data
Retrieve profile data. The returned data depends on profile type. All the data structures return are compatible with the corresponding set_data() method.
- Daily profile: a list of [ x, y, formula ] lists that represent the data for the profile.
- Weekly profile: a list of daily profile IDs that make up the weekly profile.
- Yearly profile: a list of lists: [ weekly profile ID, fromDay, toDay ], where fromDay = year day where the profile becomes active, toDay = last day of profile
- Compact profile: a nested sets of lists, each list representing on/off time periods
- Free form profile : list of lists : [ month, day, hour, minute, value ]
set_data() -> bool
Set profile data. The data to be passed depends on profile type. You need to call save_profiles() on the originating VEProject instance to permanently save any changes.
Daily Profile:
Data is represented as a list of [x,y,formula] lists
[ [x,y,formula], [x,y,formula], ... ]
Weekly Profile:
Data is represented as a list of daily profile IDs
[ ID1, ID2, ... ]
Yearly Profile:
Data is represented as a list of [weekly profile ID(string), fromDay(int), toDay(int)] lists
[ [ID1, from1, to1], [ID2, from2, to2], ... ]
Compact Profile:
Data is represented as a list of lists that contains compact profile data:
The outer list is for the number of time periods
Each time period is represented by a list of lists:
[ [toDay, toMonth], [entry], [entry], [entry], ... ]
Where an entry list is:
[description, firstTime, secondTime]
Where firstTime and secondTime are:
[True, startHour, startMinute, endHour, endMinute]
OR
[False, 0, 0] if time is not active
Description: "Label: DaysOfWeek" (eg. "Weekends: Sat, Sun")
StartHour, startMinute: 0-24, 0-59 for the start time
EndHour, endMinute: 0-24, 0-59 for the end time
Free-form Profile:
Set the free-form entries for this profile.
Data is a list of lists, where each list entry consists of a list containing the month, day, hour, minute and value of that entry.
Value is a double if no formula is set, and a string otherwise.
First and last entries cannot be changed.
[[month, day, hour, minute, value],...]
month: 1-12
day: 1-31
hour: 0-23
minute: 0-59
is_absolute() -> Bool
True if the profile is absolute, else False.
is_group() -> Bool
True if the profile is a group profile (weekly, yearly, compact or free-form), False if a daily profile.
is_modulating() -> Bool
True if the profile is modulating, else False.