https://wiki.indigodomo.com/doku.php?id ... numeration
But I've yet to learn how to use that info to built a script (is there a tutorial for that?).
How does one turn on/off a scene within a Python script?
----------------------
Scratch that...
I looked for 1/2 hour before I posted, then stumbled on it two minutes after I did!!
indigo.insteon.sendSceneOn(11, sendCleanUps=False)
----------------------
OK, don't mind me, I'm just talking to myself. Since I figured out "Part A" of my Python script, maybe someone in-the-know could help me with "Part B."
In my Action Group "TV Time", which sets up my AV gear for TV viewing, I also want the room lighting set, but only after dark. I can get that to work with the "isDaylight" variable, but what I really want is for lights to come on if it's 1/2 before sunset. I have these:
#indigo.server.calculateSunset()
#indigo.server.getTime()
And I know there is something about "delta" I can use, but how to put it all together escapes me.
So basically, what is Python for:
- Code: Select all
if sunsetTime - currentTime < 30 minutes:
indigo.insteon.sendSceneOn(sceneNumber, sendCleanUps=True)