I'm no programmer, but I stumble around using the forum and examples to create my domestic Heating Controls with a range of thermostat settings, schedules and overrides.
I've been able to list and cancel any Scheduled events, but I have and an issue trying to setup multiple Scheduled Events or looping an AddTask.....
Code: Select all
eg.scheduler.AddTaskAbsolute(sdsecs, OverrideStartTime, "Name")
where OverrideStartTime is setup in a def that includes
Code: Select all
eg.TriggerEvent("Text", payload=(starttaskdate,endtaskdate,status,temp))
I have attempted to create some uniqueness by adding a counter to the Text and/or the payload of the Trigger as well as the AddTaskAbsolute "Name" , but the result ends up the same i.e. the payload for all listed events is overwritten by the last entry. I have read in some documentation or code comments that this is expected, but I wonder if there is any alternatives to stop the overwrite?
Like I say I'm not that knowledgeable, but could it be that payload is setup as some global or namespace and if so is there a way to workaround this?
If anyone can spare the time to help with any suggestions that would be much appreciated.
thank you, Jenno