# Everyone is asleep card

**URL:** <https://community.homey.app/t/everyone-is-asleep-card/119761>\
**Category:** Ideas & Suggestions\
**Created:** [November 4, 2024, 2:53pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761 "2024-11-04T14:53:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/takie/32/86573_2.png) [@Takie](https://community.homey.app/u/Takie)\
**Post date:** [November 4, 2024, 2:53pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/1 "2024-11-04T14:53:49Z")

</div>

We have a “person x is sleeping” card, as well as an “anyone is sleeping”. But not an “everyone is sleeping”. I know this could be easily overcome with some AND logic, but still it would be a nice addition!

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [November 4, 2024, 3:30pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/2 "2024-11-04T15:30:19Z")

</div>

Isn’t there an Invert function when you right-click the card, sorry for Dutch in my example ( omkeren = Invert )

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/7/6702687b4beff67d25e3127fd6b7d830a3c0017d.png)

---

<div class="post-metadata">

**Author:** ![Takie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/takie/32/86573_2.png) [@Takie](https://community.homey.app/u/Takie)\
**Post date:** [November 4, 2024, 3:43pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/3 "2024-11-04T15:43:43Z")

</div>

You have a “someone is sleeping” AND card, inverted to “nobody is sleeping”. But what I’m looking for is everyone, instead of someone

---

<div class="post-metadata">

**Author:** ![Django](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/django/32/30811_2.png) [@Django](https://community.homey.app/u/Django)\
**Post date:** [November 4, 2024, 3:47pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/4 "2024-11-04T15:47:41Z")

</div>

last person went to sleep is a card in the presence…  
thats the one you are looking for

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [November 4, 2024, 3:47pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/5 "2024-11-04T15:47:59Z")

</div>

It’s in German, but it means “The last person has gone to sleep”, what is equal with “Everyone…”.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/e/2e4fdfe39551fdd0291dda48f317c29f34989d85.png)

---

<div class="post-metadata">

**Author:** ![Takie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/takie/32/86573_2.png) [@Takie](https://community.homey.app/u/Takie)\
**Post date:** [November 4, 2024, 3:49pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/6 "2024-11-04T15:49:24Z")

</div>

I forgot to mention (in my original post) that I need it as an AND card. This one is only a WHEN card

E.g: WHEN the door sensor opens AND everyone is asleep THEN sound the alarm. I know it can be easily done other ways. But still would be a nice to have, and a quick fix for Homey dev I presume 🙂

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [November 4, 2024, 3:59pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/7 "2024-11-04T15:59:19Z")

</div>

> [@Takie](#):
>
> quick fix for Homey dev

In that case, I would advise: ask Athom directly

---

<div class="post-metadata">

**Author:** ![Django](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/django/32/30811_2.png) [@Django](https://community.homey.app/u/Django)\
**Post date:** [November 5, 2024, 8:57am UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/8 "2024-11-05T08:57:20Z")

</div>

you can use a variable for this…  
when the last person went to sleep set EveryoneSleeping to TRUE  
in the flow that you need , use the if EveryoneSleeping variable in the and section

---

<div class="post-metadata">

**Author:** ![dsdevries](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dsdevries/32/80220_2.png) [@dsdevries](https://community.homey.app/u/dsdevries)\
**Post date:** [December 6, 2024, 12:56pm UTC](https://community.homey.app/t/everyone-is-asleep-card/119761/9 "2024-12-06T12:56:59Z")

</div>

I basically struggled with a similar issue. I have actions running on everyone’s phones that just toggle their sleep on and off when they go to sleep or wake up, and the toggle their presence on and off when they come home or leave the house.

However, in Homey, there’s no easy way to determine how many people are actually asleep at home. This is why I created this simple homey script that does that for me. I use it almost in every flow. I feel it should be basic functionality of the homey actually.

 ![Screenshot 2024-12-06 at 13.51.03](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/f/8faa25888fb2fab6ce803fa2c9259812bc434804.jpeg)  
 ![Screenshot 2024-12-06 at 13.52.01](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/e/fe4d9f6fab6fe2866b73b1eee800e89d64d8ec51.jpeg)
