Page 1 of 1

How to not run this script between times

Posted: Wednesday 16 August 2017 9:46
by DaWauZ
Hello,

Is it possible to NOT run this script between 2 times, say not between 03:00 and 09:30 ?
Because this script works like a charm, is switching light at certain values of lux. Only when we are sleeping, it is not needed in the early morning to switch lights on. How can I avoid that?
When using if time = > 09:30 , the script is giving me every minute a email and a switch lights on action. I don't like that.
lights-lux-blockly.jpg
lights-lux-blockly.jpg (103.92 KiB) Viewed 2556 times

Re: How to not run this script between times

Posted: Wednesday 16 August 2017 9:53
by freijn
This is an example of only activate it between times.
Putting this at the top of your blocky is should work I believe

Image

Re: How to not run this script between times

Posted: Wednesday 16 August 2017 9:53
by Lebo2d9
You need to create a vitrual switch with a time trigger

Verstuurd vanaf mijn SM-G920F met Tapatalk


Re: How to not run this script between times

Posted: Wednesday 16 August 2017 10:17
by DaWauZ
freijn wrote: Wednesday 16 August 2017 9:53 This is an example of only activate it between times.
Putting this at the top of your blocky is should work I believe

Image
Yes I tried but then its giving me every couple of minutes an email, and a switch command. Without anything with time, it does not. I think when you do something with time, every x time blocky runs the script. If you dont use a time, it is only triggered by switches/devices.
Lebo2d9 wrote: Wednesday 16 August 2017 9:53 You need to create a vitrual switch with a time trigger

Verstuurd vanaf mijn SM-G920F met Tapatalk
I didn't think about this option, but I do think it is a very good one, will try, thanks!

Re: How to not run this script between times

Posted: Wednesday 16 August 2017 11:15
by DaWauZ
I think this should it be then.
Am I correct that I not have to use time switch (tijdschakelaar-1) = off, because he only has to do something when de time switch is on?
lights-lux-blockly2.jpg
lights-lux-blockly2.jpg (135.73 KiB) Viewed 2542 times