Help with flow to ignore if a switch is pressed

Eveing all,

I have these 2 flows setup in the kitchen.

The first is this which turns on all the under cupboard/cabinet lights when someone walks into the kitchen at night. Which works spot on.

I then have this flow which turns the lights off after 2 mins if no motion is detected.

My question is I want the turn off to be ignored if the hue switch has been pressed to turn them on. Currently if I turn them on with the hue physical switch, after 2 mins they turn off if I am say sat at the table working. So I want the flow to be ignored if the switch is pressed, but I can’t work out how to do it.

Thanks for the help in advance.

Carl

1 Like

Hi Carl,

You can import it if you like:

This is how my switch is setup, will your example still work and how do you get the any option?

ANY function .

1 Like

I don’t get the hue dimmer switch showing up in the ‘and’ logic setting. So can’t use that option

Yes, use logic cards and search for the dimmer tags.

Nothing shows up

First you should add that “And yes/no is equal to yes” card to the flow;
next, click into the [Yes/No] field,
now the dimmer should show up from the selection list, Carl.

This seems to have sorted it. Thank you for your help, very much appreciated.

1 Like

@Carl don’t forget to set it back to the default state “no”, otherwise it won’t work after the first button press (it stays on yes). so at the second logic card, if equal to “no” is “no” (i.e. if the state is “yes”), set it to “no” with a logic card. now the default flow (turn off after 1 minute inactivity) still works.

the reason is that in your flow, there is no way that the state can ever become “no”
I also think you used the wrong card in the first flow (you should set to yes, iso check if yes)?

It seems to work as it is at the moment.

If I press any of the three ‘on’ switches on the hue dimmer then it ignores the lack of motion and the lights stay on.

Once they’re switched off with the 4th switch on the Hue dimmer it reverts to normal and reacts to motion, switching off after 1 minute. :man_shrugging:t3:

The only thing I need to solve is if it’s after sunrise as then it will turn off after 1 min. My house is rural and we have a lot of trees around. So even though it’s sunrise in the winter it’s still fairly dark in the house. But I think I can make that work.

Main point is that it works as I want it to with the flow setup I posted.

Can you explain that as I have gotten myself confused now, which isn’t hard! :rofl:

I have swapped this around now. Is this how it is supposed to be? Or do I need to add another logic card in? If so, where?

I guess I would do it like this:

Is that correct now?

that should do it. is it working correctly for you now?

Sometimes it does and sometimes it doesn’t

Eg I’ve been sat at the table just now doing some paperwork and, having pressed the switch, the strip lights just turned off after around 15mins. As soon as I got up and moved from the table they switched back on. :thinking:

in that case what happened i think is the following:

you pressed the botton. that disabled the leds off. you sit at the table. some minutes later you moved, and the zone becomes inactive again, now one minute later the leds are turned off due to motion.

the button press does not indefinitely ignore motion. you would need to add some sort of trigger that the flow can use to turn back to the default flow.

what you could do is add that when the lights are turned off though the button press, that then the flow after inactivity starts again.

so remove the set ignoremotion to yes.
add a now flow that start with when button off is pressed (on kitchen dimmer), set ignore motion to yes.

So like this?

indeed, but don’t forget, the automatic turn off version of this won’t work if you don’t manually turn off the dimmer every time…

but this should work indeed

To me the phrase ‘IgnoreMotionOff is equal to yes’ is confusing.

To me it means that the trigger ‘motion off’/‘zone became inactive’ should be ignored

I would switch both ‘yes’ with ‘no’ and ‘no’ with ‘yes’

I think you want the LED Strips to stay on when the light is turned on manually.

Therefore I would rename the variable to ‘LED Strips kitchen turned on manually‘

WHEN
the on button is pressed
THEN
set ‘ LED Strips kitchen turned on manually‘ to Yes

WHEN
the zone has been inactive for 1 minutes
AND
‘LED Strips kitchen turned on manually’ is No
THEN
………

WHEN
the off button is pressed
THEN
set ‘LED Strips kitchen turned on manually’ to No