# Lights Off after a period of no activity

**URL:** <https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941>\
**Category:** Flows\
**Tags:** advancedflow\
**Created:** [September 6, 2023, 9:39pm UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941 "2023-09-06T21:39:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [September 6, 2023, 9:39pm UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/1 "2023-09-06T21:39:05Z")

</div>

So I have a flow that turns on my living room lights at night at dusk.

Works a treat.

I want the lights to stay on until 10pm.

If someone is home and in the living room and motion is detected I want them to stay on for 30 mins after last motion has been detected.

If we are on holiday or both out of the house I want the lights to go off at 10pm or soon after this.

I had a flow that stated if a zone is inactive for 30 mins then switch off the lights but this didn’t work when we were away from home on our 2 week holiday. The lights came on and stayed on.

All help required, I have advanced flow too if needed.

---

<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:** [September 7, 2023, 5:27am UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/2 "2023-09-07T05:27:26Z")

</div>

Have you checked if there is another device besides the motion sensor, e.g. a door or window sensor, that can activate/deactivate the zone?

---

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [September 7, 2023, 6:39am UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/3 "2023-09-07T06:39:30Z")

</div>

Hi I don’t have any other devices like that, only the motion sensor

It has me stumped

---

<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:** [September 7, 2023, 9:46am UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/4 "2023-09-07T09:46:18Z")

</div>

Did you checked it in the new [widget for activity](https://homey.app/en-us/blog/new-ways-to-control-your-home/)? Btw, a smart washing machine can also activate/deactivate a zone if this feature isn’t disabled.

Please share your flow.

---

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [September 7, 2023, 2:44pm UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/5 "2023-09-07T14:44:34Z")

</div>

Hi sure, I’ve used this over 3 flows, thanks for the help

[https://homey.app/f/8P66MF](https://homey.app/f/8P66MF)

[https://homey.app/f/WUp6MF](https://homey.app/f/WUp6MF)

[https://homey.app/f/1ht6MF](https://homey.app/f/1ht6MF)

---

<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:** [September 8, 2023, 12:16pm UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/6 "2023-09-08T12:16:19Z")

</div>

Because of this info…

> [@gy\_1977](#):
>
> zone is inactive for 30 mins

…I thought you use the **Zone Activity** flow cards.  
So my to first post are irrelevant for this problem.

I don’t have any experience with the Fibaro UBS, so this works in combination with Motions Sensors without any problems?  
You named the UBS as “Liv & Kit PIR (1&2) Bar (3)”. At _ **Input 1** _ of the UBS, do you have 2 MS installed, one in the living room and one in the Kitchen? Or what does it mean?  
Do you have more than these 3 flows in combination with _ **Input 1** _ of the UBS? Is the timer _ **Living Room** _ also used for other flows? Because I don’t see any mistake in the flows.  
Did the flows ever work? Or didn’t you checked them before before going on holiday?  
What is the purpose of the _ **Outdoor Photocell** _ device?

But maybe this flow ist the problem:

> [@gy\_1977](#):
>
> I have a flow that turns on my living room lights at night at dusk.

If the lights are turned on at dusk? How will they been turned off when no one is at home?

Sorry, a lot of questions…  
My suggestion is to create these three flows as simple as possible, so first without all the condition flow cards and a timer duration of 10 seconds or so, just to check if they will work. And then add the time condition card, and so on, and so on.

---

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [September 8, 2023, 9:56pm UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/7 "2023-09-08T21:56:12Z")

</div>

I’m using a Fibaro implant connected to an alarm PIR for motion.

The outdoor photocell is a dusk/dawn sensor so brings all my house lights on at dusk.

I’ve used the time at 10pm as a trigger now to start a timer and the lights will stay on when movement is detected and go off after 15 mins of no movement.

Seems to be working so far.

Thanks for your help 👌🏽

---

<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:** [September 9, 2023, 11:11am UTC](https://community.homey.app/t/lights-off-after-a-period-of-no-activity/88941/8 "2023-09-09T11:11:09Z")

</div>

I am happy that it works now, but actually it’s only a workaround. I’m not a guy who is happy with workarounds, but that shouldn’t be your problem. 😉

But I remembered something else. Homey once had problems with time cards when the period went from one day to the next. So you can try changing the flow card “The time is between 22:00 and 00:00” to “The time is between 22:00 and 23:59”, maybe this will fix the problem.
