autolog wrote:Here's a Python script suggestion:
- Code: Select all
scheduleState = indigo.schedules[scheduleID or "scheduleName"].enabled
then set the variable by:
- Code: Select all
indigo.variable.updateValue(indigo.variables.getId("variable_name"), str(scheduleState))
or
- Code: Select all
indigo.variable.updateValue(indigo.variables.[variableId], str(scheduleState))
The variable will then be set to True or False depending whether the schedule is enabled or not
I appreciate the help with the Python script.
So using your code I have made another schedule that runs the following every 30 seconds, which seems to retrieve and properly update the variable:
- Code: Select all
scheduleState = indigo.schedules[917345397].enabled
indigo.variable.updateValue(indigo.variables.getId("garageRollupMonitorIsActive"), str(scheduleState))
On a control page, I figured out how to display the value of a variable in the form of text, so it shows either True or False, but it is text only.
I need a little more help as to how to display 2 different graphics on a control page based on a variable value (like green dot for true, red dot for false). Is this possible? I don't see an obvious way to do this using the Indigo Control Page editor.
Thanks,
Chris