Issue with motion sensor and light bulb in scene

Hello,

I have a problem with a scene involving turning off a bulb via a motion detector.

Zigbee key: CC2652RB type 2 (location in my living room not far from my freebox, WiFi channel 11 and Zigbee channel 11)
On the upper floor:
a router key on the upper floor (the CC2531)
in the room concerned:
an Aqara motion detector RTCGQ11LM
IKEA bulb: LED1836G9

My scene from 8:00 PM to 7:30 AM if the motion detector has been inactive for 25 minutes then turn off the light.

So my trigger is the change of state of the motion detector with execution only once
Action 1: time condition « after 8:00 PM and before 8:00 AM Â» (all week)
Action 2: Wait 25 minutes
Action 3: turn off the light / send a message (precisely to see if it works)

I do not receive any message at night and the status of the bulb is always ON even though it has been more than 25 minutes since the status has changed. I had put a message in parallel with waiting and it arrives well up to there

Manually I can manage the bulb well

Attached my diagram via zigbee2mqtt on 8080, the bulb is at zero because it is turned off electrically, but otherwise it is also connected to the upper router.

There is one thing that intrigues me is that the bulb and the electrical outlet (Lidl) are considered as routers.

Thanks in advance for the help

I found the issue, it’s the time condition after 8 PM and before 7:30 AM that isn’t working. It works if I set it to after 12:00 AM and before 7:30 AM.

I can’t set a time condition from the previous evening to the next morning.
Is this normal?

@mikael Oh I see, after all « after 20:00 Â» and « before 7:30 Â», it’s a condition that is never valid!

(x > 20:00 AND x < 7:30) is never valid

I think you want another condition, you want the condition:

After 20:00 OR before 7:30, right?

That’s a good point, as it stands there is no OR in this time condition :slight_smile:

A solution would be to create 2 different scenes, one:

  • Motion detection
  • AND after 20:00

another:

  • Motion detection
  • AND before 7:30

From a development perspective, it may seem normal; but if we want to keep it as simple as possible for the average user, I also think implementing the « or Â» in the background would be a real plus if the end time is before the start time.
And perhaps specify something like « J+1 Â» in the UI near the end time to highlight the fact that the range is over two days (user perspective)/is in two parts (developer perspective).

@pierre-gilles: yes, it’s the programming OR but the descriptive language AND…
2 scenes, can’t wait for scene duplication :wink:
It should be specified that for now the time condition is on the same day.

@Shiftmaj Yes 100% agree that it’s not clear as it stands :slight_smile:

A small remark on « continue only if Â» (by the way, wouldn’t it be better to put « if and only if Â») with the condition « light bulb on/off Â» we must necessarily add a numerical value or as value/state « state Â» in zigbee debug (8080) « ON Â» or « OFF Â». I deduced that it was 1 (ON) or 0 (OFF).

Am I right (in this case if two possible choices to put them) or is this an evolution that I should request?

It’s true that it’s not very clear :slight_smile: In my mind, I would like this action to be like the state change trigger: just put selectors with the possible values (on/off, slider for brightness, etc..)