Python Example - Creating Delayed Action

Posted on
Thu Jan 25, 2018 9:32 am
jenwill1 offline
Posts: 150
Joined: Mar 22, 2009
Location: Boerne, Texas

Python Example - Creating Delayed Action

I am writing some simple python scripts to do things around the house...

I'm a relative newbie on this but have worked thru variables, devices and if statements. I can't find an example of creating/removing a "delayed action" for a device.

Anyone have any examples I would appreciate it !

Posted on
Thu Jan 25, 2018 11:15 am
jay (support) offline
Site Admin
User avatar
Posts: 14156
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Python Example - Creating Delayed Action

Creating delayed actions for a device is specific to the device command. For instance, the toggle command (along with turnOn and turnOff) take a delay parameter:

http://wiki.indigodomo.com/doku.php?id= ... ass#toggle

To remove delayed actions on a device:

http://wiki.indigodomo.com/doku.php?id= ... ed_actions

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jan 25, 2018 1:27 pm
jenwill1 offline
Posts: 150
Joined: Mar 22, 2009
Location: Boerne, Texas

Re: Python Example - Creating Delayed Action

Just what the doctor ordered ! Thanks Jay

Posted on
Thu Jan 25, 2018 1:32 pm
Colorado4Wheeler online
User avatar
Posts: 2401
Joined: Jul 20, 2009
Location: Colorado

Re: Python Example - Creating Delayed Action

So, Jay, you do some wicked home automation...
Screen Shot 2018-01-25 at 12.31.38 PM.png
Screen Shot 2018-01-25 at 12.31.38 PM.png (8.78 KiB) Viewed 646 times

You know that point where there's TOO much home automation going on? You reached it.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Jan 25, 2018 3:24 pm
jay (support) offline
Site Admin
User avatar
Posts: 14156
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Python Example - Creating Delayed Action

Colorado4Wheeler wrote:
So, Jay, you do some wicked home automation...
Screen Shot 2018-01-25 at 12.31.38 PM.png

You know that point where there's TOO much home automation going on? You reached it.


Yes, that was somewhat unfortunate, though likely not really noticed by any but those firmly in the gutter. Speaking of, where IS durosity?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jan 25, 2018 3:28 pm
Colorado4Wheeler online
User avatar
Posts: 2401
Joined: Jul 20, 2009
Location: Colorado

Re: Python Example - Creating Delayed Action

jay (support) wrote:
Speaking of, where IS durosity?

No way, mister, it's YOUR week to watch him. I had him last week. Nice try though.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Jan 25, 2018 5:00 pm
roussell offline
User avatar
Posts: 931
Joined: Aug 18, 2008
Location: Alabama

Re: Python Example - Creating Delayed Action

:D :D :D :D :D
I seriously just spit out my sandwich! ass#toggle Made my day!

I'm Terry and I'm 9 years old.. :)

Posted on
Thu Jan 25, 2018 5:44 pm
Colorado4Wheeler online
User avatar
Posts: 2401
Joined: Jul 20, 2009
Location: Colorado

Re: Python Example - Creating Delayed Action

roussell wrote:
:D :D :D :D :D
I seriously just spit out my sandwich! ass#toggle Made my day!

I'm Terry and I'm 9 years old.. :)


I remember a discussion, and Durosity was involved in it of course, where there was discussion about automating the bathroom mirror and it started to take a turn for the worse. This type of toggling is in lieu of laxatives after a heavy night of Taco Bell.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Jan 25, 2018 6:25 pm
Colorado4Wheeler online
User avatar
Posts: 2401
Joined: Jul 20, 2009
Location: Colorado

Re: Python Example - Creating Delayed Action

And now I have a new avatar....

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Jan 25, 2018 6:35 pm
roussell offline
User avatar
Posts: 931
Joined: Aug 18, 2008
Location: Alabama

Re: Python Example - Creating Delayed Action

Colorado4Wheeler wrote:
And now I have a new avatar....


Best ever! Interwebs won!

Posted on
Fri Feb 23, 2018 6:46 pm
durosity offline
User avatar
Posts: 3448
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Python Example - Creating Delayed Action

Colorado4Wheeler wrote:
jay (support) wrote:
Speaking of, where IS durosity?

No way, mister, it's YOUR week to watch him. I had him last week. Nice try though.


The reports of my death have been greatly exaggerated. I’m here.. just taking a break. Had a lot going on IRL recently and I’ve kinda found HA a bit overwhelming. I’ll be back, eventually :)

Computer says no.

Posted on
Fri Feb 23, 2018 6:56 pm
DaveL17 offline
User avatar
Posts: 3883
Joined: Aug 20, 2013

Re: Python Example - Creating Delayed Action

durosity wrote:
The reports of my death have been greatly exaggerated. I’m here.. just taking a break. Had a lot going on IRL recently and I’ve kinda found HA a bit overwhelming. I’ll be back, eventually :)

Hey brother - glad to hear that you're still kicking. Whatever it is, hang in there. We'll leave the lights on.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri Feb 23, 2018 11:50 pm
matt (support) offline
Site Admin
User avatar
Posts: 18370
Joined: Jan 27, 2003
Location: Texas

Re: Python Example - Creating Delayed Action

DaveL17 wrote:
durosity wrote:
The reports of my death have been greatly exaggerated. I’m here.. just taking a break. Had a lot going on IRL recently and I’ve kinda found HA a bit overwhelming. I’ll be back, eventually :)

Hey brother - glad to hear that you're still kicking. Whatever it is, hang in there. We'll leave the lights on.

+1. It definitely isn't the same without you around, but we'll be here when you are ready/able to rejoin. :wink: Take care.

Image

Posted on
Sun Feb 25, 2018 11:10 am
jay (support) offline
Site Admin
User avatar
Posts: 14156
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Python Example - Creating Delayed Action

durosity wrote:
I’ll be back, eventually :)


Much like the flu... :twisted:

It has been a bit boring here as of late!

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Feb 26, 2018 4:45 am
durosity offline
User avatar
Posts: 3448
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Python Example - Creating Delayed Action

jay (support) wrote:
It has been a bit boring here as of late!


So what you're saying is my presence here is critical to your enjoyment of your job? And to think how many times you almost banned me. :)

Starting to get a bit more back into HA after a couple of months of rather cripling anxiety issues. I actually went as far as pretty much disabling most of my HA stuff as I was getting so paniced over odd little things or whenever that issue with the disabling of certain devices happened. Getting a bit better now. Mostly got things restored to how they were.

Computer says no.

Who is online

Users browsing this forum: No registered users and 2 guests