Have action reoccur every minute if door is left open


#1

1) Give a description of the problem
Action is only triggered once
2) What is the expected behaviour?
I’d like my google homes to broadcast that someone left the door every minute the door contact sensor is open. Once the sensor is closed, the action should end.

3) What is happening/not happening?
I am able to get the announcement to run once, but not more than once, even if the door stays open.

**4) Post a Green Snapshot of the piston![image|45x37]


#2

There are a few different ways you can do this,

1 - Using the repeat command
2 - Setting up a timer for 1 minute
3 - Using a variable
etc

ie:

Every minute
If contact sensor IS OPEN (condition)
then
do this do that

#3

@ike2018 made an excellent suggestion. The problem is it would actually run every minute all day which would bog down your network. I would suggest something like this:

if bulb changes to on
then
   wait 1 minute
   while bulb is on
      with location     <--Never cancel
         make POST request
         wait 1 minute
       end with
   end while
end if

This will just start running when the light is turned on (or door opened) and then announce every minute until turned off (or closed).


#4

you are right, didn’t think about that part.


#5

Like this? I think i might have the first wait incorrectly placed?


#6

The first announcement goes off after 60 seconds. However, a second announcement does not play 60 seconds later while the door is still open. What do you think the prob is?


#7

I think I have it now. Thanks!


#8

You might want to delete the second WAIT on line 31…
(unless you want a 2 min wait between events)


#9

Thanks…