At the end if I can’t figure it out I will do this, but I’d really like to keep all the light automation in one piston 
@ipaterson When I changed the task execution policy of the If statement to execute task on condition change only it didn’t run. Logs as per below (I think…)
11/09/2017, 23:39:53 +58ms
+2ms â•”Received event [Main Space Motion Sensor].motion = active with a delay of 937ms
+238ms â•‘RunTime Analysis CS > 24ms > PS > 72ms > PE > 142ms > CE
+250ms â•‘Runtime (38874 bytes) successfully initialized in 72ms (v0.2.0e7.20170906) (246ms)
+251ms â•‘â•”Execution stage started
+272ms â•‘â•‘Comparison (enum) active is (string) active = true (3ms)
+275ms ║║Cancelling condition #278’s schedules…
+276ms â•‘â•‘Condition #278 evaluated true (13ms)
+290ms â•‘â•‘Comparison (integer) 10 is_less_than_or_equal_to (integer) 800 = true (3ms)
+296ms ║║Cancelling statement #280’s schedules…
+347ms â•‘â•‘Executed physical command [Main Living Room Dimmer].setLevel([100]) (43ms)
+348ms â•‘â•‘Executed [Main Living Room Dimmer].setLevel (44ms)
+351ms â•‘â•‘Condition #279 evaluated true (73ms)
+352ms ║║Cancelling condition #196’s schedules…
+353ms â•‘â•‘Condition group #196 evaluated true (state changed) (91ms)
+358ms ║║Cancelling statement #212’s schedules…
+365ms â•‘â•‘Skipped execution of physical command [Main Living Room Dimmer].on([]) because it would make no change to the device. (4ms)
+366ms â•‘â•‘Executed [Main Living Room Dimmer].on (6ms)
+389ms â•‘â•‘Comparison (enum) active is (string) active = true (3ms)
+391ms â•‘â•‘Condition #147 evaluated true (18ms)
+404ms â•‘â•‘Comparison (integer) 10 is_less_than_or_equal_to (integer) 350 = true (3ms)
+410ms ║║Cancelling statement #285’s schedules…
+464ms â•‘â•‘Executed physical command [BSMT Dimmer].setLevel([100]) (44ms)
+465ms â•‘â•‘Executed [BSMT Dimmer].setLevel (46ms)
+467ms â•‘â•‘Condition #284 evaluated true (75ms)
+469ms â•‘â•‘Condition group #128 evaluated true (state did not change) (96ms)
+474ms ║║Cancelling statement #144’s schedules…
+482ms â•‘â•‘Skipped execution of physical command [BSMT Dimmer].on([]) because it would make no change to the device. (3ms)
+483ms â•‘â•‘Executed [BSMT Dimmer].on (6ms)
+490ms ║╚Execution stage complete. (239ms)
+499ms ╚Event processed successfully (498ms)