yes it will always be turned off after 5 mins of inactive unless motion becomes active again during the wait time of 4 mins.
Thanks for the swift answer.
How would I amend the piston to make sure it only turns off in this special scenario.
I have a general “turn lights off if no movement” Piston covering all lights (after 20 mins) and it bothers me, that RGB7 turns off before.
As in: Only turn off the light if the first IF-Block triggered it.
@ady624 helped me with this earlier in the thread. Check out #3907 & #3990 above
structure it this way so the light is controlled with this piston only at night … unless thats not what you want?
if location mode is night
if motion changes to active
and
any of bulbs ..... is off
turn on
end if
if motion stays inactive for 5 mins
wait 4 mins
turn off
end if
end if
Not sure if I understand the difference, but at first glance, this would yield a similar result?
Say mode is night, someone in my house turned RGB7 on to read while at some point I go to the bathroom, The first if block would not trigger because the lights are on already…then 9 minutes later the second IF-Block would would turn RGB/ off regardless, because the reading would not be picked up by the motions sensor.
Am I missing something?
this would yield a similar result expect it would only turn on and turn off the light at night. sorry, i was trying to address this. didnt know there was reading involved
are you looking for a solution to keep the lights on when it is turned on manually but still have it be controlled by motion at other times?
Sorry for not having been precise enough
From a syntax point of view I guess I want IF-Block 2 to be evaluated ONLY if IF-Block 1 turned out a “true” and executed something, otherwise I want IF-Block 2 to be ignored.
no worries.
are you looking for a solution to keep the lights on when it is turned on manually but still have it be controlled by motion at other times?
I´d have to think of additional usecases, but yeah…I think that would get me a big step closer regarding the “reading” scenario.
Yeah I ahve seen the samples, but have to admit some of that stuff is already too advanced for me. Especially the variable setting part.
But brainstorming with you actually lead me to the solution I was aiming for - I think.
Moving the second if block INSIDE the first one should do the trick, no?
unfortunately that wont work. you cant put an if with a trigger inside another if with a trigger. you could simply remove the second if and wait 9 minutes and turn off the light … which would work except when the light is already on and the motion becomes actives … that would really defeat the purpose.
but, if you use that example as a template you can always delete the variable level setting task. i can also help with answer any questions.
You were right.
I just tested and the light never turned off after 9 minutes. I guess I still have a bit of a learning curve, but I think I am getting the gist of your sample piston. And you know what, even if I dont…i will just c/p, insert my devices and let it work even if I dont completely get it yet
just restore that piston using the orange button and the code in that image and insert your devices. it will work and give you a chance to figure out how it works.
I will, thanks! I am sure it will work perfectly
The LANnouncer setup worked great! Couldn’t have been any easier to set up.
perfect might be a bit strong, but it should work for the scenario you described
Can someone please tell me how ‘switch physically changed to…’ vs ‘switch programatically changed…’ is supposed to work? I expected it would only be active if I flip the switch myself instead of in the ST app, but it activates even in the app. My plan is if a switch is manually turned on, I would like to pause a piston that normally controls that switch until the switch is manually turned off. But the piston pauses even if the switch is turned on in the ST app.
Here’s my piston:
Hi all, I’m going to test this tomorrow. This fades evening lights on at around sunset, but also fades them on if illuminance drops below a certain level. I’m attempting to put all of this in one piston, so hopefully it works out. If anyone sees any glaring issues, let me know…