Pausing a mode Piston


#1

1) Give a description of the problem
I would like to pause a vacation mode to switch from vacation at 11pm to away and then back to vacation at 6am. The times in the piston are arbitrary - i was using to see if it works - it does not.

2) What is the expected behaviour?
Change modes back and forth once per day

3) What is happening/not happening?
Will change from Vacation to away, but after waiting it doesn’t change back to vacation

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full

8/26/2020, 8:08:02 PM +838ms
+9859ms	║Piston waited at a semaphore for 9764ms

#2

Personally,

  • Instead of using WAITS, I would use two time triggers.
  • Instead of using WHILE, I would use a normal IF.

For example

Every day at X
do
   IF Location mode is Vacation
   Then
      Set location mode to Away
      Send PUSH
   END IF
END EVERY

Every day at Y
do
   IF Location mode is Away
   Then
      Set location mode to Vacation
      Send PUSH
   END IF
END EVERY

#3

THat makes sense, except that would put it into a vacation mode from an away mode right? Vs just pausing the vacation mode for say 7 hours?

Sorry, I only have a basic understanding of this stuff.


#4

I think i figured it out! Thanks for the help.

Solution was;

everyday at x
if location mode is vacation
then
set location mode to away
wait x
set location mode to vacation


#5

You may have to set Task Cancellation Policy to Never on that WAIT block…