Homey Community Forum

Presence in "AND" block

Ok, so I was going to start using presence more actively in my flows, and was hoping to use them as AND clauses for my existing flows. There are flow cards for things like “first person coming home” and “last person going to bed”, but…these can only be used to start flows. Not supplement already existing flows being started by something else.

Let’s say I have a flow that’ll turn the lights on when it gets dark outside, so I’d like to add “and [someone’s home] and not [the first person has gone to bed]” or something like that. Is that at all possible? And if not - why?

The obvious workaround is to create my own boolean variables for “someoneHome” and “someoneSleeping” or something like that and maintain them with flows triggered by the presence actions, but…that seems like a lot of work when it’s almost implemented already :wink:

Oh, and why not “first person goes to sleep” and “last person woke up”?

Hmmm…Thanks. I see I made the error of not considering the not option. I’ll play around some more. Thanks :slight_smile:

Might still have to create some custom variables, though, so might as well create my own functions.

But still…there aren’t any way to say “the last person got up”? As a trigger?

1 Like

Thanks. This is what I’m doing for my own flows maintaining my own variables, but it’s not possible to do entirely in the “and clause”, as far as I can see.

I don’t need logic variables as this tag comes from the trigger.
And you can’t put the trigger in the and, there you need conditions. So I don’t understand what you want to do.

1 Like

Well, I have a few flows where something like this is needed, and they all have their own triggers. Like my “All on” flow, to turn on the lights. I don’t really want to run this if someone’s sleeping. The trigger is the light switch, and the presence needs to be an and clause, not a trigger.

But…I have now made some flows to update my own boolean variables for things I need to check. These flows can be triggered by presence events, and I can thus use logic comparison in the and clause of my existing flows.

But how do you see that?
a trigger is a fraction of a split second.
So you wake up as last but then no one is sleeping… then your are to late to press the button.

I guess if you clearly define what you think it should be possible to create a couple of flows for that.

A workaround for last person woke is: someone woke and then test if all persons are awake. Not pretty but it will work.