Enable / Disable Schedule using Python Script

Posted on
Thu Mar 26, 2020 3:47 pm
HEGarrard offline
Posts: 40
Joined: Sep 09, 2014

Enable / Disable Schedule using Python Script

I am wondering how to enable or disable a schedule using python script.

I know that my schedule has this python script reference ... indigo.schedules[461689202]
I have tried adding .enable or .enabled - but I keep getting a scripting error.

Any suggestions?

Thank you!

Harold

Posted on
Thu Mar 26, 2020 4:43 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Enable / Disable Schedule using Python Script

Hi Harold,

Try:

Code: Select all
indigo.schedule.enable(461689202, False)

(True argument to re-enable)

Image

Posted on
Thu Mar 26, 2020 8:20 pm
HEGarrard offline
Posts: 40
Joined: Sep 09, 2014

Re: Enable / Disable Schedule using Python Script

Matt,

Thank you very much!
I "googled" and searched the indigo documentation and could not find an answer.

Is there a good source for finding the format, etc for scripting various indigo functions in python?

Harold

Posted on
Fri Mar 27, 2020 3:05 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Enable / Disable Schedule using Python Script

Yes, but (for your example) it wouldn’t have helped as its pending “FixMe”...


https://wiki.indigodomo.com/doku.php?id ... _reference


Sent from my iPhone using Tapatalk Pro

Posted on
Fri Mar 27, 2020 8:46 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Enable / Disable Schedule using Python Script

Yeah, we'll get the Schedule And Trigger documentation finished once they are more complete. Those FixMe's have been there an embarrassingly long time.

In this case a lot of the Trigger documentation here also applies to Schedules. That is you can also use those 2 additional optional arguments. The execute() method shown below that is also available for Schedules.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests

cron