# How can I handle wake/sleep status automatically?

**URL:** <https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [February 28, 2025, 6:56am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745 "2025-02-28T06:56:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_WedMore\_Lund](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kenneth_wedmore_lund/32/128966_2.png) [@Kenneth\_WedMore\_Lund](https://community.homey.app/u/Kenneth_WedMore_Lund)\
**Post date:** [February 28, 2025, 6:56am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/1 "2025-02-28T06:56:34Z")

</div>

How do you guys handle automatic change of sleep / awake status of family?

Is there a way to do this without requiring them to go to the Homey app to change the status and without having a flow based on fixed times like “at 9pm, set Julian to status=sleeping” ?

---

<div class="post-metadata">

**Author:** ![Limofant](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/limofant/32/123396_2.png) [@Limofant](https://community.homey.app/u/Limofant)\
**Post date:** [February 28, 2025, 8:19am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/2 "2025-02-28T08:19:24Z")

</div>

So I did this via an automation with the iPhone. When a certain focus is activated on the iPhone, I am automatically set to sleep. If this is deactivated again then wake up. And I then tied this to the condition that I am at home.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [February 28, 2025, 11:10am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/3 "2025-02-28T11:10:47Z")

</div>

I use the Withings Sleep Pad, but it’s an expensive option if that’s all you want it for 🙂

---

<div class="post-metadata">

**Author:** ![Kenneth\_WedMore\_Lund](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kenneth_wedmore_lund/32/128966_2.png) [@Kenneth\_WedMore\_Lund](https://community.homey.app/u/Kenneth_WedMore_Lund)\
**Post date:** [February 28, 2025, 11:34am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/4 "2025-02-28T11:34:40Z")

</div>

I actually DID look at that earlier (before getting the Homey) because I’m pretty interested in my sleep, so maybe I should try it out. I didn’t get it at the time because it was my impression that my Apple Watch already does this (and more) sleep tracking?

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [February 28, 2025, 11:43am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/5 "2025-02-28T11:43:05Z")

</div>

They’re very good and helped me find I have sleep apnea, which I then went to the Dr about and now have a CPAP machine. I now get a much better night’s sleep 😴 💤

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [February 28, 2025, 4:13pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/6 "2025-02-28T16:13:00Z")

</div>

I have been using/trying out two methods:

- A pressure mat (+/- €20) connected to an Aqara T1 water leak sensor;
- A car seat occupancy sensor (+/- €10) connected to an Aqara T1 water leak sensor.

I placed them under my mattress. Both options work ok-ish, but are not perfect. There is no option in Homey to configure pressure thresholds. So you need to handle false positives/negatives in your flows to get a ‘good enough’ result. The occupancy sensor option gives better results in my experience and is also the more affordable option.

---

<div class="post-metadata">

**Author:** ![Limofant](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/limofant/32/123396_2.png) [@Limofant](https://community.homey.app/u/Limofant)\
**Post date:** [February 28, 2025, 5:21pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/7 "2025-02-28T17:21:02Z")

</div>

But this is very cumbersome. Why don’t you do that with a focus on your phone or the alarm clock on your phone?

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [February 28, 2025, 5:22pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/8 "2025-02-28T17:22:45Z")

</div>

Me and my partner have the Withings Sleep and it works quite well. But it doesn’t tell who is sleeping there like some times our dog likes to slep on the bed while we are away.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [February 28, 2025, 5:32pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/9 "2025-02-28T17:32:54Z")

</div>

Because it detects when someone goes to bed or gets out of bed and then sets the awake/asleep status _automatically_.

So you don’t have to perform a manual action, like setting your phone to a focus mode or via a fixed schedule.

Just for context: it’s just a matter of connecting the two wires of the pressure mat/seat presence sensor to the two screw terminals on the outside of the Aqara sensor. You only need a screwdriver.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 1, 2025, 9:37pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/10 "2025-03-01T21:37:51Z")

</div>

What do the 2 screwterminals do ? You ‘fake’ a leak by short wire these ?

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [March 1, 2025, 9:49pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/11 "2025-03-01T21:49:57Z")

</div>

The two terminals are normally used to detect water: in case of a leak the water completes the circuit between the two terminals (located at the bottom of the sensor).

 ![IMG_1722](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/b/ab9c36189083b16a7586bd491de36d242ae19c5d.jpeg)

Since these screw terminals are easily accessible, you can also connect other things to it. The water sensor basically acts as a binary sensor: completed circuit = alarm on; incomplete circuit = alarm off.

Both the pressure mat and seat occupancy sensor have two wires that you can connect to the terminals. Then, when you apply pressure to the mat/occupancy sensor, the circuit completes and the alarm of the water sensor goes on. When you release pressure, the circuit is not complete anymore and the water sensor’s alarm goes off.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 1, 2025, 10:20pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/12 "2025-03-01T22:20:27Z")

</div>

Thanks! Nice to know, could potentially open up a range of applications!

---

<div class="post-metadata">

**Author:** ![Barry\_Ingle](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/barry_ingle/32/82709_2.png) [@Barry\_Ingle](https://community.homey.app/u/Barry_Ingle)\
**Post date:** [March 1, 2025, 10:37pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/13 "2025-03-01T22:37:55Z")

</div>

Currently working on this right now. I use a hold-click on a Flic switch on my nightstand that tells Homey I’m going to sleep. I use the same switch to turn off my alarm that I set in my Sonos (single-click). The click runs a flow that turns off the alarm and switches my status to Awake.  
It’s still s work in progress but so far so good.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 2, 2025, 9:17am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/14 "2025-03-02T09:17:06Z")

</div>

@SunBeech whats about the max current you can apply to the terminals ?  
Probably only low voltage ?

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [March 2, 2025, 9:30am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/15 "2025-03-02T09:30:04Z")

</div>

It is the Aqara water sensor that is powering the terminals. The attached peripheral is only an extension of its circuit, like a switch. The Aqara uses a standard 3V CR2032 battery.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 2, 2025, 11:20am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/16 "2025-03-02T11:20:15Z")

</div>

Ok, so it’s a ‘dry’ contact.

Thanks !

Might be mis-useing this setup sometime 😃

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 2, 2025, 5:48pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/17 "2025-03-02T17:48:33Z")

</div>

> [@JohanP](#):
>
> Ok, so it’s a ‘dry’ contact.

No, it doesn’t switch, it can’t switch things on/off.  
It only starts an internal action by connecting the contacts with a wire. Or by using a dry contact from any other device.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [March 2, 2025, 8:41pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/18 "2025-03-02T20:41:15Z")

</div>

Sorry, that’s what I ment, you need a device with a dry contact.

Still, it creates possibilities…

---

<div class="post-metadata">

**Author:** ![Jeremy\_BEAUCERE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeremy_beaucere/32/78856_2.png) [@Jeremy\_BEAUCERE](https://community.homey.app/u/Jeremy_BEAUCERE)\
**Post date:** [March 4, 2025, 9:17am UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/19 "2025-03-04T09:17:46Z")

</div>

Hello, I have a less direct approach, I use all of my house devices to detect activity, and when my house zone is inactive since 10 minute, and I’m at home, then I’m sleeping.

I simulate my house activity as soon as one of my lights or computers are on.  
Each 5 minutes, I check if my lights or computers are off, then I stop the simulated activity.

To simulate the activity, I use a “[Virtual Device](https://homey.app/en-us/app/com.arjankranenburg.virtual/Virtual-Devices/)” from **Arie J. Godschalk** , with device class: **Home Alarm** , configured as a motion sensor.  
That allow me to switch activity on or off in flows

---

<div class="post-metadata">

**Author:** ![Piotr\_Grochowski](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/piotr_grochowski/32/9530_2.png) [@Piotr\_Grochowski](https://community.homey.app/u/Piotr_Grochowski)\
**Post date:** [March 4, 2025, 6:26pm UTC](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745/20 "2025-03-04T18:26:26Z")

</div>

I used 2 Withings Sleep mats for last 3 years, but recently one of them stopped working properly (keeps inflating, doesn’t properly recognize presence). As I’ve read on the net, it’s a trash now, not able to repair… So I found much cheaper alternative: [Bed Presence for ESPHome — Elevated Sensors](https://www.elevatedsensors.com/store/p/bed-presence-for-esphome)  
Waiting for it to arrive, ordered a week ago. 🙂

[Next page](https://community.homey.app/t/how-can-i-handle-wake-sleep-status-automatically/131745.md?page=2)
