Flow for shutting down the house when in bed

On both my wife and my outlets next to the bed I have 2 zigbee outlets. If my wife’s phone is plugged in and my phone is plugged in I’d like to execute a specific flow. If only my phone is plugged in, a different flow or if her phone is only plugged in another flow.

I have a flow now that initiates a prompt when my phone gets plugged in but since adding a zigbee outlet to her phone charger I figured I could automate the entire process of shutting down the entire house and locking the doors without intervention.

Any thoughts or tips on how you might be doing this appreciated.

You need advanced flows to do something like this. You also need to think about a period of time where you are wanting to determine of one or both phones are plugged in (you will never do this at the same time, right?).

From the top of my head, when either phone is plugged in start a timer/countdown. If it ends do the specific phone plugged in flow. If -during the timer- the other phone is plugged in, do the “both phones”-flow.

Something like this? Or were you thinking of something else?

Yeah I have advanced flows so that’s no problem.

Well a timer could be interesting to only execute one flow verses 3 separate flows based on different scenarios.

Right now I have 2 flows setup that are executed after a prompt once I plug in my phone.

  • both in bed
  • only me

we’re both in bed shut everything down, lock doors etc.

If only I’m in bed and she is still up, I shut most things down except for specific rooms where she could be. Then she has to manually shut things down.

The third flow would be that she is in bed and then shut down rooms where I’m not likely to be.

Maybe this adds some more clarity on what I’m trying to achieve?

It’s not really difficult, it’s just a logical thing. In my opinion a countdown app isn’t also needed. Maybe it will be useful to use a time range as a condition card, e.g. Time is between 20:00 - 02:00 o’clock. This time range prevents the flow from being triggered if any of you want to charge your smartphone at bed during the day.
Btw, AF isn’t really needed, but it makes it a lot easier.

When…
– Man plugged in smartphone (power changed)
And…
– Wife’s SP isn’t plugged in
– Time is between 20:00 - 02:00 o’clock *1
Then…
– Actions for men
Else…
– Complete shutdown

*1 Optional

And the same flow for the plug on women’s side of the bed.


So I tried something like this but I’m not sure that this is going to work with the desired results? Any help here would be appreciated.

I have another flow enabling this flow after 21:00 so that it does not fire beforehand and stay in a constant loop.

NEVER connect to inputs from aan ALL on different triggers! That doesn’t work !

Proof:
Both triggers are executed with Action Top Left and create Work#1 and Work#2 on the Timeline,
However the middle Action behind the ALL will NEVER be activated:

This is where I struggle with flows… I don’t fully understand the logic and then get stuck creating them. Thanks for the tips.

Would I then want to start this flow when the time is 21:30 and then when power is greater than if both execute flow A, if not execute flow B?

Let me see if I can try to break this down better to what I would like to achieve with this flow (or maybe flows) and hopefully it might make more sense to the community.

We are using 2 Frient Smart Plug Mini (Zigbee) outlets that have power management with flow cards for when the power (Watts) change. Reference: frient App for Homey | Homey

Wife gets in bed to read before me and typically charges her phone. When I get into bed I put my phone on the charger.

When I get into bed and she is already in bed, I would like to shut everything down in the house, lock the doors, etc. If I get into bed and she is not already in bed, only shut down the rooms and stuff where I typically am and lock the doors.

Another possibility since I travel for work, is if I’m not at home and she gets in bed and plugs in her phone, it should shut everything down, but maybe I’m getting to greedy here?

I don’t understand why you didn’t follow my example… :man_shrugging:t3:

No, it’s quite simple like my first sample, but now as Advanced Flow:

1 Like

I think I missed/overlooked your reply! Thanks for the visualization. Testing it now over the next days.