Can’t seem to find a way to do this, trying to find a way of enabling a schedule when a script is run. I want to use it this way to allow me to toggle on/off schedules using a button on a control page, hence the extra bits in the script below about changing the values of the variables.. everything else works fine except the enabling/disabling of the schedule!
if value of variable "schedule1" is equal to "on" then
set value of variable "schedule" to "off"
disable schedule “heating on between 12:00am and 1:00am"
else
set value of variable "schedule1" to "on"
enable schedule "heating on between 12:00am and 1:00am"
end if
Any ideas?