# Is The Error In My Logic, or in Homey's Logic?

**URL:** https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800
**Category:** Questions & Help
**Tags:** advancedflow
**Created:** [November 5, 2024, 1:25am UTC](https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800 "2024-11-05T01:25:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Joel\_Dearing](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/joel_dearing/32/79290_2.png) [@Joel\_Dearing](https://community.homey.app/u/Joel_Dearing)
#### Post date: [November 5, 2024, 1:25am UTC](https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800/1 "2024-11-05T01:25:32Z")

</div>

WHERE IS MY ERROR? Using my Homey Pro, a Zooz ZSE11 motion sensor, and Jasco Zwave dimmer, I want defined lighting dayparts. In the broadest form, from sunset until 10:21PM, when someone walks into the room the zwave light will comes on. The Issue Is: between midnight and local sunrise if motioned is triggered the routine will run and the light will come on.  
FINER DETAILS: This is a four-part advanced flow to trun on the light between Sunset and 10:21p.  
PART 1 WHEN motion alarm is turned on AND the time is between local sunset and 10:21p, THEN turn on Zwave light and Pause Guest Bedroom Timer and Pause Guest Bedroom Timer Off  
PART 2 WHEN motion alarm is turned off THEN start Guest Bedroom Timer countdown for thirty seconds  
PART 3 WHEN the Guest Bedroom Timer Countdown reached zero, AND the time is between 10:21p And local sunset, THEN Dim Zwave light to 17% And start Guest Bedroom Timer Off  
PART 4 WHEN the Guest Bedroom Timer Off reaches zero, THEN Turn Off the z wave light  
This All Works As It Should  
This also works as it should between local sunrise and local sunset, (the light does not come on)  
So why does the motion sensor turn on the light between 12m and local sunrise when it should stay off. I even added another command that says WHEN motion is sensed, AND it is between 12:01and 6:30a turn on the light to 1%. It is so dim, I won’t see it. The blue LED on the Jasco switch is brighter. But this does not work. Between MDN and sunrise if motion is detected the light comes on at 15%

 ![Screenshot (34)](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/c/5c7801b3bd2415c209a1ae9f875b22cd6b221142.png)

---

<div class="post-metadata">

### Author: ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)
#### Post date: [November 5, 2024, 5:43am UTC](https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800/2 "2024-11-05T05:43:54Z")

</div>

> [@Joel\_Dearing](#):
>
> So why does the motion sensor turn on the light between 12m and local sunrise when it should stay off.

Because of this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/c/0c149e12da0f71ebbd6c42cb524199fb4237ceaa.png)

---

<div class="post-metadata">

### Author: ![Joel\_Dearing](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/joel_dearing/32/79290_2.png) [@Joel\_Dearing](https://community.homey.app/u/Joel_Dearing)
#### Post date: [November 7, 2024, 12:41am UTC](https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800/3 "2024-11-07T00:41:10Z")

</div>

Thank you for the reply. Yes, you would expect that between midnight and 6:30 if there is motion, the light would come on at 1%, which for hose bulbs is basically off. But even with that setting in play, when the sensor senses motion between 12m and 6:30am the light will come on at 15% dim to 11% then turn off. It should not do that between mdn and 6:30, it should turn on to 1%, then trigger off.

---

<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: [November 7, 2024, 2:27am UTC](https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800/4 "2024-11-07T02:27:01Z")

</div>

This sounds like there’s another flow controlling the light.  
In the web app, you can right-click the device tile, click “Flows” to see which flows are involved.  
Same goes for the motion sensor.

I can recommend adding Simple Log cards to your flows, you can review what happened.

---

<div class="post-metadata">

### Author: ![Joel\_Dearing](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/joel_dearing/32/79290_2.png) [@Joel\_Dearing](https://community.homey.app/u/Joel_Dearing)
#### Post date: [November 11, 2024, 8:01pm UTC](https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800/5 "2024-11-11T20:01:45Z")

</div>

Hi Peter, Thanks for the reply. Yes, there is another flow that controls the light. A whithings pressure sensor mat under the mattress. This device has two flows: WHEN I get into bed, AND the time is between 10:23p and 7:25a THEN turn the light off, also, WHEN I get out of bed, AND the time is between 10:23p and 7:25a THEN turn the light on to 13% This worked as it should until I added the sensor, then the light level would come on at the previously set level of 25%. Way too bright at 3a when mr. bladder calls.

---

<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: [November 11, 2024, 10:15pm UTC](https://community.homey.app/t/is-the-error-in-my-logic-or-in-homeys-logic/119800/6 "2024-11-11T22:15:07Z")

</div>

I can’t tell. I only know, Homey does what you tell it to do.  
Maybe there’s a flow which triggers by zone activity, from the zone that motion sensor is in?  
Or try disabling “zone activity” from the motion sensor advanced settings, to see if there’s a change.
