Turn lights on when i get home

Hi. I cant find a solution. I want homey to turn on some of my lights if me or my girlfriend comes home but only if No one is home. And its after sunset.

Ive tried
when: some one came Home.

Its after sunset
Nobody is home

Turn the lights on.

I guess its beacuse when someone comes home the status change to home and when the card nobody is home activate it wont work just beacuse someone is home.

I would like the card nobody is home to be placed under when but thats not an option

So u would like this as a trigger card?
When would it trigger then?

And when u use WHEN someone came home AND nobody is home that would be confusing aye?
Can u try without the “And nobody is home” card and see if that works?

Okay. I can see that problem. But How should i do it.

Turn the lights on if its after sunset and Im the First one home. I Dont want the lights to turn on if someone is home.

In case i comes home at night and my girlfriend is asleep. I do not want the lights to turn on. But if shes not home then i want them to turn on

Ur cards are in the Smart presence app!


I would create variable ’ someonehome’.

when: some one came Home.

Its after sunset
Someonehome == off

Turn the lights on.
Set variable Someonehome = on

make sure to create flow to set Someonehome to Off when everybody left

1 Like

Im a noob and cant make it work. I have port forwarding on my router. I have the option to create DHCP but the gap betwen the ip Numbers must be at least 20

I have a tplink router

U must be looking for DHCP reservations me guess.
Like here.

Ive created static ip for my phones should that ip be between that 20 i have to choose.

For exempel. My iPhone is xxx.xxx.xx107
Should i set the DHCP reservation to xxx.xxx.xx.100 - xxx.xxx.xx.120?

No, just 107.
So reservation for phone would be xxx.xxx.xx.107
Added link in my above post.

Thats not possible it have to be 20 between.

I can make a reservation for my phone so that get the same ip all the time. Is that enough? Its calles adressreservation on my router

That will be correct!

Alright. I Will try that. Now my phone has the same ip all the time. With some of my Otter devices. Thanks.

Do you now How long i Will have to be disconected for it to activate? And i just downloaded it to my homey. Is there anything else i have to do?

It did not work. I Will try ifttt now.

How do you make that kind of variable?

So. I might figured it out.
I Will use ifttt to mark me or my girlfriend home or away when connecting or disconecting from our router.


Someone came home.

Its aftersunset
A specific user is not home. (Me)
Its after sunset
A specific user is not home (girlfriend)

Turn lights on

So if someone of us comes home late and one of us isnt home, the light Will turn on?

Which doesn’t work in 2.0 right?

Can’t you use the “asleep” function? Or a certain time frame only?


I have learned that splitting up flows makes life much simpler.
Yes you do get a lot of flows, but you can also re-use them.
My action flows trigger (WHEN) with a card ‘when this flow is started”
My trigger flows end (THEN) with a start this flow

1 create an action flow that sets your lights to the desired state
2 create trigger flow that triggers when nobody is home (and triggers the flow above
3 create a flow that diables the action flow when its ligt
4 and another that enables the flow when its dark
(This is were you can easily combine flow, one “its dark” flow enables a whole set of flows)
5 and another that disables the action flow when somebody is home
6 and one to enable…
Yes, lots of flows, but less entanglements and easy to debug (use the papaertrails app)

Is working here.