The set occupied function may only be used by EMS thermostats. The function switches a thermostat from occupied mode to unoccupied, or vice versa. If used on a Smart thermostat, the function will throw an error. Switch occupancy events are treated as Holds. There may only be one Switch Occupancy at one time, and the new event will replace any previous event.
Note that an occupancy event is created regardless what the program on the thermostat is set to. For example, if the program is currently unoccupied and you set occupied=false, an occupancy event will be created using the heat/cool settings of the unoccupied program climate. If your intent is to go back to the program and remove the occupancy event, use resumeProgram instead.
|Use the provided startDate, startTime, endDate and endTime for the event. If start date/time is not provided, it will be assumed to be right now. End date/time is required.
|The end date/time will be set to the next climate transition in the program.
|The hold will not end and require to be cancelled explicitly.
|Use the value in the "holdHours" parameter to set the end date/time for the event.
|The climate to use for the temperature, occupied (true) or unoccupied (false).
|The start date in thermostat time.
|The start time in thermostat time.
|The end date in thermostat time.
|The end time in thermostat time.
|The hold duration type. Valid values: dateTime, nextTransition, indefinite, holdHours.
|The number of hours to hold for, used and required if holdType='holdHours'.
All other properties of the Event are available to be written with the exception of Event.linkRef and Event.type.