Automatic Switching into Night Mode


#1

1) Give a description of the problem
I want Location Mode to change into Night mode automatically. It’s not…

2) What is the expected behavior?
When the three motion sensors have had no motion for at least the specified time (different amounts because they’re in different places), I want all the downstairs lights (as defined by global variables) to turn off, and the speakers downstairs, Nest to drop to 16 deg and finally mode to change to night.

3) What is happening/not happening?
The ‘Then’ part happens, just I struggle to get it started, I created a virtual switch to force it over which works most of the time… :confused:

4) Post a Green Snapshot of the pistonimage

Is it not working because it’s trying to complete all the motion sensor ones first??


#2

I played around with it to this:

my logs are as below:

11/04/2018, 22:53:26 +778ms
+3ms ╔Received event [Home].test = 1523483606778 with a delay of 0ms
+65ms ║RunTime Analysis CS > 15ms > PS > 31ms > PE > 19ms > CE
+70ms ║Runtime (42791 bytes) successfully initialized in 31ms (v0.3.104.20180323) (67ms)
+72ms ║╔Execution stage started
+80ms ║║Comparison (time) 82406854 is_after (time) 79200000 = true (2ms)
+80ms ║║Time restriction check passed
+81ms ║║Condition #16 evaluated true (5ms)
+82ms ║║Condition group #15 evaluated true (state did not change) (7ms)
+83ms ║║Cancelling condition #2’s schedules…
+84ms ║║Condition group #2 evaluated true (state changed) (9ms)
+111ms ║║Duration 2280137ms for was_not >= 1800000ms threshold = true
+111ms ║║Comparison (enum) inactive was_not (string) active = true (20ms)
+113ms ║║Condition #25 evaluated true (28ms)
+135ms ║║Duration 1418715ms for was_not >= 600000ms threshold = true
+136ms ║║Comparison (enum) inactive was_not (string) active = true (18ms)
+138ms ║║Condition #10 evaluated true (25ms)
+145ms ║║Comparison (enum) inactive stays_away_from (string) active = true (1ms)
+147ms ║║Condition #22 evaluated false (9ms)
+148ms ║║Condition group #9 evaluated false (state did not change) (62ms)
+153ms ║║Condition #26 evaluated false (5ms)
+154ms ║║Cancelling condition #2’s schedules…
+155ms ║║Condition group #2 evaluated false (state changed) (69ms)
+157ms ║╚Execution stage complete. (87ms)
+162ms ║Setting up scheduled job for Wed, Apr 11 2018 @ 10:57:56 PM BST (in 269.761s)
+255ms ╚Event processed successfully (254ms)


#3

shouldnt need a virtual switch. change ALL 3 motion conditions to:

motion sensor 4s motion was not active for at least X minutes

right now 2 of the motion conditions are was not active for at least X minutes and 1 of them is stays away from active for Y minutes.


#4

Thanks for your help. I’ve made the change as below. I can keep the Virtual Switch in there can’t I? For testing purposes, or to force it into night mode only?