Page 1 of 1
"Time > Sunrise AND Time < Sunset" doesn't work
Posted: Wednesday 18 October 2017 16:10
by Feddan
I have two saved events, where I want to turn Off an outside lamp on Sunrise, and turn it On on Sunset.
Sunrise:

- DomoBlockySunrise.PNG (39.68 KiB) Viewed 5649 times
Sunset:

- DomoBlockySunset.PNG (39.26 KiB) Viewed 5649 times
But it doesn't work! What am I missing?
Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Wednesday 18 October 2017 16:25
by CaesarPL
Why blockly

? You can do it directly on the switch.
Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Wednesday 18 October 2017 19:08
by Feddan
CaesarPL wrote: Wednesday 18 October 2017 16:25
Why blockly

? You can do it directly on the switch.
Oh, I did not know that. I will try that instead, thanks!
Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Wednesday 18 October 2017 20:22
by jvdz
For the record: The SunSet blockly is never true as that is pretty impossible when you think about it! Maybe an OR relation would be better for that one.
Jos
Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Thursday 19 October 2017 9:21
by CaesarPL
Please check my example. When you press Timers, you can set time when you want to switch On or Off

Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Thursday 19 October 2017 9:46
by Derik
you need to make a blockley more in this setup. because you use the extra if blockley...
Or you can use the base blockley.
Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Tuesday 12 December 2017 16:07
by olleman
I'm having a similliar problem but my blockly is a bit more advanced so I can't solve it directly on the switch.
My first condition (this one triggers as expected)
is "If PIR on AND Time: >Sunset AND Time: <22.00
Set whatever Switch on for 2 minutes
Second condition (this one doesn't trigger)
"If PIR on AND Time: >Sunset AND Time: <Sunrise
Set whatever Switch on for 2 minutes
Any suggestions to what I'm doing wrong?
Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Thursday 14 December 2017 6:58
by kuifje
When its >sunset it is <sunrise, and the other way around. You dont need the <sunrise of the >sunrise. And you dont need the if/else blocky but the one without the blue thing.
Good luck.
Kuifje
Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Monday 12 February 2018 11:56
by Xztraz
Set trigger on time and this works. (you'r script would trigger every minute between times)

Re: "Time > Sunrise AND Time < Sunset" doesn't work
Posted: Saturday 01 December 2018 9:01
by aDJa
Hi there,
I had the same challenge, but also wanted everything in de blockly with sunset sunrise.
unfortunately i still had to use a dummy switch but i got the rest in de blockly.
see attachement:

- BlocklyActivatestairsDuringNight
- blocklytrappenhuis.jpg (97.91 KiB) Viewed 3450 times
p.s. the dummy has a sunrise and sunset timer but is also being turned off when the stairs are being turned off manually. (its not being turned on by the stairs)