HolidaySchedulesV1
Manage holiday lock/unlock schedules data on device.
Trait Type: Bulk Data
HolidaySchedules data files
As this is a bulk data trait, interactions will require passing data in separate files rather than as payloads in the API requests and events. The data files passed to Yonomi Platform for writing data to the device as well as files passed from Yonomi Platform for reporting state of the device will have the following schema. Note: If a holiday schedule is applied at the same time as a device schedule, the behavior of the holiday schedule takes precedent.
{
"holidaySchedules": []
}The “holidaySchedules” array may be left empty if the device is not to have any holidaySchedules. Otherwise, this array should be populated with holidaySchedule objects (See the “Defining HolidaySchedules data objects” page). When writing data to the device, data files must include ALL holidaySchedule objects desired to be on the device (rather than just the objects to be updated) as sending new data will overwrite existing databases on the device.
Action Mutations
Note: See Overview: Device Action Lifecycle for more information on action flows
HolidaySchedulesV1RequestHolidaySchedulesURL action
Requests uploadUrl to allow writing a new holidaySchedules data to a device. Upon getting the URL, users must make a PUT request to that URL with data structure as defined in the "HolidaySchedules data files" section on this page. Uploading the data will result in Asynchronous processing of the data file and uploading to the device. Any error or success responses on the action after uploading the data file will be surfaced as DEVICE_ACTION_UPDATED events.
Mutation Inputs
Input Name | Description | Data Type | Nullable |
deviceId | uuid of the device to which mutation should apply | ID! | false |
GQL Examples
Request Example
mutation HolidaySchedulesV1DeviceTrait {
HolidaySchedulesV1DeviceTrait(
deviceId: "9a8f6104-6c50-476e-90ee-16b9a2dafc8d"
) {
deviceId
actionId
uploadUrl
uploadUrlExpiresAt
}
}Response Example
{
"data": {
"HolidaySchedulesV1DeviceTrait": {
"deviceId": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d",
"actionId": "7eb3629a-a1c3-49f0-89b6-2831d500ac68",
"uploadUrl": "https://fakefileurl.com",
"uploadUrlExpiresAt": "2025-04-25T15:46:18.181Z"
}
}
}Reported States
Note: See Overview: Device Reported State for more information on reported state flows.
State Definitions
downloadUrl state
Url where data file containing all device lock/unlock schedules data reported from device. File includes entire dataset, not just the changes since last report. See separate documentation for file requirements
Data Type: URL
downloadUrlExpiresAt state
Timestamp when the downloadUrl is set to expire.
Data Type: string (Value formatted as an ISO 8601 UTC dateTime)
Device State Query GQL Examples
Request Example
query Device {
device(deviceId: "9a8f6104-6c50-476e-90ee-16b9a2dafc8d") {
id
traits {
... on HolidaySchedulesV1DeviceTrait{
name
state {
downloadUrl {
reported {
value
}
}
downloadUrlExpiresAt {
reported {
value
}
}
}
}
}
}
}
Response Example
{
"data": {
"device": {
"id": "9a8f6104-6c50-476e-90ee-16b9a2dafc8d",
"traits": [
{
"name": "HolidaySchedulesV1",
"state": {
"downloadUrl": {
"reported": {
"value": "https://fakefileurl.com"
}
},
"downloadUrlExpiresAt": {
"reported": {
"value": "2025-04-25T15:56:28.513Z"
}
}
}
}
]
}
}
}
What made this section unhelpful for you?
On this page
- HolidaySchedulesV1