Page 1 of 1

Switch off at specific time

Posted: Tuesday 13 September 2016 17:40
by Ritmeester
Simple question. This LED strip must go on with Sunset and go off at 01:00 hours in the night.

I can’t find such as:

and go Off at 01:00
2016-09-13_17-34-48.png
2016-09-13_17-34-48.png (17.45 KiB) Viewed 2225 times

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 18:01
by mrf68
Simple answer:

Create a second script: if led strip is on and time = 01:00 then set led strip= off.

Or am I missing something?

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 18:13
by Ritmeester
Thanks.

But I can´t do this in the same script?

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 18:15
by Egregius
Use timers for such simple things.

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 19:20
by Ritmeester
Nice, but how ?

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 19:24
by mrf68
Ritmeester wrote:Thanks.

But I can´t do this in the same script?
You can do it in the same script, use the else if functionality, it's in the blockly with the "+" sign.

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 20:25
by SweetPants
As Egregius said, just use switch timers, much easier

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 21:20
by oliviers
Well, in the swich widget, click on "planning", and create two events ...
- One to turn the strip on at sunset
- One to turn it off at 1:00am...

It's that simple.... No need for scripts or Blockry or ....

Or did we all miss something here???

Oliviers

Re: Switch off at specific time

Posted: Tuesday 13 September 2016 21:32
by Egregius
Ritmeester wrote:Nice, but how ?
Click on the timers button of the switch and add actions as desired.