OK! Here is a set of files to download:
The binding and action JARs have to be installed together and other versions of the JAR removed from the addons folder.
The example items, rules and sitemap files at the link show the changes, but to summarize I added a new method signature:
@ActionDoc(text = "The set hold function sets the thermostat into a hold with the specified event parameters.")
public static boolean ecobeeSetHold(
@ParamDoc(name = "selection", text = "The thermostat selection to set hold.") String selection,
@ParamDoc(name = "params", text = "The map of hold parameters.") Map<String, Object> params,
@ParamDoc(name = "holdType", text = "(opt) The hold duration type. Valid values: dateTime, nextTransition, indefinite, holdHours.") String holdType,
@ParamDoc(name = "holdHours", text = "(opt) The number of hours to hold for, used and required if holdType='holdHours'.") Number holdHours,
@ParamDoc(name = "startDateTime", text = "(opt) The start date in thermostat time.") Date startDateTime,
@ParamDoc(name = "endDateTime", text = "(opt) The end date in thermostat time.") Date endDateTime) {
The params
parameter can be any of the fields of the SetHold function, or possibly settable Event object fields:
isOccupied
isCoolOff
isHeatOff
coolHoldTemp
heatHoldTemp
fan
vent
ventilatorMinOnTime
isOptional
isTemperatureRelative
coolRelativeTemp
heatRelativeTemp
isTemperatureAbsolute
fanMinOnTime
holdClimateRef
For example, this rule will set an indefinite fan hold:
rule FanHold
when
Item desiredFan received command
then
logInfo("FanHold", "Setting fan hold to " + receivedCommand.toString)
val params = newLinkedHashMap(
'isTemperatureAbsolute'-> false,
'isTemperatureRelative' -> false,
'isCoolOff' -> true,
'isHeatOff' -> true,
'coolHoldTemp' -> 90,
'heatHoldTemp' -> 50,
'fan' -> receivedCommand.toString)
ecobeeSetHold("987654321098", params, null, null, null, null)
end