The [Time < 23:59] and [Time > 00:00] aren't necessary, you'll accomplish the same with:PetervandePol wrote: ↑Saturday 02 February 2019 9:48Thank you, @tozzke.tozzke wrote: ↑Thursday 31 January 2019 21:46what @geezerrr and @waaren said with the addition that the Set part should be split in two. So you'll have to add a Set block for YeeLight 1 and another Set block for YeeLight 2, you can't use the 'and' block in the outputPetervandePol wrote: ↑Wednesday 30 January 2019 14:34 Hi,
I am afraid I need some help. I can't figure out how to switch two lamps on between sunset and sunrise with a motion sensor. It works without the time restiction, but I do not want the lights on and off during the day. Based on the examples in this forum I have made this:
But nothing happens Where do I go wrong?
Also the 'On for x minutes' doesn't always react as you might think it does. When the device is off when the 'if' is triggered, it'll turn on and after the set time it'll turn off like you'd expect. Is the device already on however (when the 'if' is triggered) it won't turn off but will turn to the state it was at the trigger, so "back" on in that case.
I changed to:
... and this works to switch "on" but like you predicted the lights do go on, but not off. How do I achieve that then?
Code: Select all
If [ [ [Bewegingsensor keuken] = [On] ] and [ [Time > [Sunset] ] or [Time < [Sunrise] ] ] ]
Do [Set [Yeelight 1] = [On] ]
[Set [Yeelight 2] = [On] ]
[Set [Yeelight 1] = [Off] after [300] seconds]
[Set [Yeelight 2] = [Off] after [300] seconds]