matt (support) wrote:The schedule object model isn't 100% complete yet, but most of the basics are there. You can tell if a schedule is currently enabled like this (same format as with triggers):
- Code: Select all
indigo.schedules[SOME_SCHEDULE_ID_OR_NAME].enabled
I actually want to determine when in a day a schedule is activating.
I have radiators that have a morning on, morning off, evening on and evening off time set by 4 separate schedules. The schedule times can vary by radiator (depends on room location). I want to pick up on the 4 times the schedule activates. Also, possibly in the future (if needed) I might want to extend the number of 'on'/'off' sessions in a day but two is enough for me at the moment.
I want to emulate a 'Boost' and 'Advance' button on a central heating time switch. This is where 'Advance' will advance to the next program and 'Boost' turns the radiator on for a fixed period (typically an hour). To do the 'Advance' processing I need to compare the current time to the Schedule to determine whether to turn the heating 'on' or 'off'. Likewise with 'Boost', I need to make sure that I don't switch the heating 'off' at the end of the 'Boost' period if the heating should be on because of the schedule.
I can probably achieve this by setting variable switches in a schedule action but querying the schedule would be more elegant.