# Sudden light extinction

**URL:** <https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930>\
**Category:** Scènes\
**Created:** [October 1, 2026, 2:52pm UTC](https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930 "2026-10-01T14:52:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![curing](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/curing/32/22964_2.png) [@curing](https://community.gladysassistant.com/u/curing)\
**Post date:** [October 1, 2026, 2:52pm UTC](https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930/1 "2026-10-01T14:52:06Z")

</div>

Hello,

I spent 3 days on Home Assistant without success to do activities that seemed simple to me (including a light alarm clock), so I’m turning to Gladys now (with Zigbee2MQTT).

I created a scene in my hallway to turn on the lights when motion is detected, then the lights turn off automatically.

-Motion detected → lights turn on  
-After X minutes without motion → lights dim  
-After X minutes without motion → lights turn off

-If I move during the dimming → return to full power

-Day: higher light intensity | Night: lower light intensity

My issue:

1. Sudden turn off: the lights turn off instantly, while the turn on and dimming are smooth. I have enabled transitions in Zigbee2MQTT/device/setting (specific)/transition: Has anyone managed to have a fade-out turn off with Hue Gu10 bulbs?

Thanks for your tips! 🙏

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [October 1, 2026, 7:10pm UTC](https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930/2 "2026-10-01T19:10:53Z")

</div>

Hello and welcome to Gladys!

Your two issues have an explanation. I’ll address them in order.

### 1. Sudden Shutdown

The «&nbsp;Turn off the lights&nbsp;» action in Gladys simply sends `{"state": "OFF"}` to `zigbee2mqtt/<your bulb>/set`. It’s Zigbee2MQTT that applies the transition, or not. In principle, when the `transition` option is set on the device, Z2M transforms this OFF into a gradual decrease to 0, then turns it off.

To find out where the problem lies, turn off the bulb directly from the Z2M interface. If it’s also instant, Gladys is not to blame: it’s between Z2M and the bulb. Then check that the transition value (in seconds) has been saved.

In any case, the most reliable way is to request the transition directly in the message: it then takes precedence over the device option. In your scene, replace «&nbsp;Turn off the lights&nbsp;» with the action **«&nbsp;Send a Zigbee2mqtt message&nbsp;»** :

- **Topic** : `zigbee2mqtt/NAME_OF_YOUR_BULB/set` (the name as it appears in Z2M, including the `zigbee2mqtt/` prefix)
- **Message** : `{"state": "OFF", "transition": 3}` (3 seconds of fade)

You need one action per bulb. If your GU10s are in a Z2M group, one message to `zigbee2mqtt/GROUP_NAME/set` is sufficient, and they will turn off exactly at the same time. The same trick works for dimming, for example `{"brightness_percent": 20, "transition": 2}`.

### 2. The Delay That Doesn’t Restart from Zero

The scene does not resume where it left off. Each movement starts a **new execution** of the scene, _in parallel_ with the one already running, and Gladys does not cancel the previous one.

I assume your scene looks like «&nbsp;Movement → turn on → Wait 2 min → dim → Wait 30 s → turn off&nbsp;». When you move during the dimmed phase, the new execution turns the light back on. But the old one is still in its «&nbsp;Wait 30 s&nbsp;», and it turns off at the end. Moreover, 2 minutes later, the new execution will dim the brightness, which can turn the lamps back on low: setting a brightness turns on a Z2M bulb.

The solution is to stop counting time with «&nbsp;Wait&nbsp;» and let the trigger do it. The «&nbsp;Device State Change&nbsp;» trigger has an option for this: **«&nbsp;Run the scene after the condition has been valid for:&nbsp;»**. The timer is canceled as soon as the sensor goes back to «&nbsp;Motion detected&nbsp;», and it restarts from zero at the next «&nbsp;No motion&nbsp;».

You should therefore split it into 3 small scenes:

**Scene A – Hallway: Turn on**

- Trigger: «&nbsp;Device State Change&nbsp;» → hallway detector = **Motion detected**
- Actions: your day/night logic. For example, a «&nbsp;If… Then… Else…&nbsp;» condition containing a «&nbsp;Temporal Condition&nbsp;»: Then strong brightness, Else weak brightness.

**Scene B – Hallway: Dim**

- Trigger: hallway detector = **No motion** , checking «&nbsp;Run the scene after the condition has been valid for: **2 minutes** &nbsp;»
- Action: dim the brightness

**Scene C – Hallway: Turn off**

- Trigger: hallway detector = **No motion** for **150 seconds** (2 min + 30 s, because the two timers start at the same time)
- Action: the Zigbee2mqtt message `{"state": "OFF", "transition": 3}` seen earlier

Result: if you move during the dimmed phase, scene A turns the light back on and the timers for B and C are canceled. When you stop, they restart from zero: 2 minutes at full, then 30 seconds dimmed, then fade off.

Two tips:

- In B and C, also check «&nbsp;Run only when the threshold is crossed&nbsp;». The timer then only starts when switching from «&nbsp;Motion detected&nbsp;» to «&nbsp;No motion&nbsp;». If the sensor returns «&nbsp;No motion&nbsp;» later, the dimming will not be restarted, and your lamps will not turn back on low.
- The timer only starts when the detector sends «&nbsp;No motion&nbsp;», and each detector waits a certain time before sending it. On some models, this time is adjustable in Z2M (option `occupancy_timeout`). The actual delay is therefore this time plus your 2 minutes: adjust accordingly.

The duration in seconds in the trigger and the Zigbee2mqtt action are available in the current version of Gladys (5.1.3): make sure to update if needed.

Keep us posted!

---

<div class="post-metadata">

**Author:** ![curing](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/curing/32/22964_2.png) [@curing](https://community.gladysassistant.com/u/curing)\
**Post date:** [October 1, 2026, 11:24pm UTC](https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930/3 "2026-10-01T23:24:54Z")

</div>

Thank you very much, it’s very precise! Indeed, I had used «&nbsp;wait&nbsp;». I understand your logic when I read it.

1. 

I notice that on shutdown, the transition time indicated in M2QTT will simply indicate the delay between the shutdown command and the light turning off, rather than having a gradual light intensity decrease over the indicated transition duration.  
It’s a bit mysterious:

- If I enter «&nbsp;0&nbsp;» in transition, the light turns on abruptly and turns off abruptly.
- If I put 1, the light makes a slight transition when turning on, but turns off abruptly.
- If I put 5, the light makes the same transition as 1 when turning on, and turns off abruptly with a 5-second delay.

I confirm that even with {«&nbsp;state&nbsp;»: «&nbsp;OFF&nbsp;», «&nbsp;transition&nbsp;»: 3}, my GU10 lights turn off abruptly.  
I do have an action per bulb, I haven’t made a group. Do you advise me to group my bulbs when I have two in pairs and send commands to the group rather than to each bulb separately?

Maybe I should enable Hue native control?

1. 

For the second point, I would like your opinion on a detail: during the day, after 2 minutes, it dims for 30 minutes and then turns off. But at night (in the idea), it turns on for 5 minutes, does not dim, and turns off after 5 minutes (unless motion is detected in the meantime, it restarts for 5 minutes).

For this, I tried to add a time condition in «&nbsp;hallway dim&nbsp;» and in «&nbsp;turn off&nbsp;»:

Time Condition (07:00 - 23:00)

Then: Dim light

Otherwise: empty (in the idea, «&nbsp;empty&nbsp;» would mean continue «&nbsp;hallway turn on&nbsp;»?)

And I separated the turn off scene by making one for the day (after 150 seconds), and one for the night (after 5 minutes)

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [October 2, 2026, 10:38am UTC](https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930/4 "2026-10-02T10:38:47Z")

</div>

Thanks for the detailed feedback, your test is very insightful!

### 1. Shutdown

With a transition, your GU10 waits for the duration and then cuts off abruptly. By default, Z2M simulates fade-out shutdown with a standard Zigbee command (« decrease to 0 then turn off »), and your bulbs apparently execute it in their own way.

So yes, activate **Hue native control** on each bulb, in the device-specific settings in Z2M. Z2M then uses the Hue-specific protocol, that of the Hue bridge, and the transition becomes a real fade duration (if the bulb supports it). Then retest `{"state": "OFF", "transition": 3}`.

If that doesn’t change anything, here’s a Plan B for the shutdown scene, since your brightness reductions are indeed smooth:

1. Message `{"brightness": 1, "transition": 3}`
2. Wait 3 seconds
3. Message `{"state": "OFF", "transition": 0}`

For the group, this isn’t essential. Gladys doesn’t manage Z2M groups like devices: you can only control it with the « Send a Zigbee2mqtt message » action. Its advantage is a single command and two bulbs perfectly synchronized. With 2 bulbs, two messages in succession are sufficient. First set the fade on one bulb.

### 2. Day / Night

Your logic is good. With an empty « Else », the « Hallway Dim » scene simply stops without doing anything, and the lamps stay on as they are. It doesn’t « continue » « Hallway Lighting », which has already finished its work, but the result is the one you want. Even simpler: put the Time Condition directly as the first action, followed by the dimming. Outside the time range, the scene stops there.

Important point: each shutdown scene must have **its own** Time Condition as the first action. Otherwise, the « day » shutdown (150 s) also triggers at night and cuts off after 2 minutes 30 seconds:

- **Day Shutdown** : No movement for 150 s → Time Condition After 07:00 / Before 23:00 → shutdown
- **Night Shutdown** : No movement for 5 min → Time Condition After 23:00 / Before 07:00 (Gladys manages the midnight transition) → shutdown

The condition is checked when the timer ends, so it also works around 23:00 and 07:00. At night, a movement cancels the 5-minute timer, which restarts from zero at the next « No movement ».

PS: you wrote « dim for 30 min ». If it’s indeed 30 s, 150 s is the correct value; for 30 min, you would need to set 32 min.

---

<div class="post-metadata">

**Author:** ![curing](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/curing/32/22964_2.png) [@curing](https://community.gladysassistant.com/u/curing)\
**Post date:** [October 2, 2026, 1:46pm UTC](https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930/5 "2026-10-02T13:46:30Z")

</div>

Thanks! Makes sense indeed! I replaced the «&nbsp;If, Then, Else&nbsp;» statements when the «&nbsp;Else&nbsp;» is empty, as it seems to be the same as simply putting a time condition «&nbsp;If, Then&nbsp;».

(Good catch, I wanted to write 30s, it’s corrected)

1. When activating «&nbsp;Hue Native Control&nbsp;» on my 2 GU10 lights, I notice that the scenes do not start during the day. So for now I have deactivated it. Do I need to do something else for the scene to work once «&nbsp;Hue Native Control&nbsp;» is activated?
2. With «&nbsp;Hue Native Control&nbsp;» deactivated, «&nbsp;{«&nbsp;state&nbsp;»: «&nbsp;OFF&nbsp;», «&nbsp;transition&nbsp;»: 3}&nbsp;» does not give me a smooth fade-out.
3. With «&nbsp;Hue Native Control&nbsp;» deactivated, «&nbsp;{«&nbsp;brightness&nbsp;»: 1, «&nbsp;transition&nbsp;»: 3}&nbsp;» + 3s + «&nbsp;{«&nbsp;state&nbsp;»: «&nbsp;OFF&nbsp;», «&nbsp;transition&nbsp;»: 0}&nbsp;» does not give me a smooth fade-out either.
4. If I activate «&nbsp;Hue Native Control&nbsp;», should I leave «&nbsp;transition: 1&nbsp;» or is it no longer taken into account?
5. Does «&nbsp;Hue Native Control&nbsp;» work well without a Hue Bridge?
6. (Minor issue), I notice that the full power activation lasts 2 minutes 15 seconds (instead of 2 minutes), and that the dim lasts 30 seconds (perfect). Any idea to achieve exactly 2 minutes on the dot?

# Scene 1: Activation

**When**  
Input Sensor 1 (Motion Detection) - Motion Detected - nothing checked

**Then  
Condition «&nbsp;If… Then… Else…&nbsp;»  
Time Condition**≥ 07:00 · ≤ 23:00

**Then  
At the same time  
Control a device -** zigbee2mqtt-ceiling-input-1-light-brightness-brightness · 254  
**Control a device -** zigbee2mqtt-ceiling-input-2-light-brightness-brightness · 254

#### **Else**

**At the same time  
Control a device -** zigbee2mqtt-ceiling-input-1-light-brightness-brightness · 51  
**Control a device -** zigbee2mqtt-ceiling-input-2-light-brightness-brightness · 51

# Scene 2: Dim

**When**  
Input Sensor 1 (Motion Detection) - No Motion - Execute the scene after the condition has been valid for: 2min

**Then  
Time Condition**≥ 07:00 · ≤ 23:00  
**At the same time  
Control a device -** zigbee2mqtt-ceiling-input-2-light-brightness-brightness · 26  
**Control a device -** zigbee2mqtt-ceiling-input-1-light-brightness-brightness · 26

# 

Scene 3: Daytime Extinction

**When**

Input Sensor 1 (Motion Detection) - No Motion - Execute the scene after the condition has been valid for: 150s

**Then**

**Time Condition** ≥ 07:00 · ≤ 23:00

**At the same time**

**Send a Zigbee2mqtt message** zigbee2mqtt/Ceiling Input 1/set - {«&nbsp;state&nbsp;»: «&nbsp;OFF&nbsp;», «&nbsp;transition&nbsp;»: 3}

**Send a Zigbee2mqtt message -** zigbee2mqtt/Ceiling Input 2/set - {«&nbsp;state&nbsp;»: «&nbsp;OFF&nbsp;», «&nbsp;transition&nbsp;»: 3}

# Scene 4: Evening Extinction

**When**

Input Sensor 1 (Motion Detection) - No Motion - Execute the scene after the condition has been valid for: 5min

**Then**

**Time Condition** ≥ 23:00 · ≤ 07:00

**At the same time**

**Send a Zigbee2mqtt message -** zigbee2mqtt/Ceiling Input 1/set - {«&nbsp;state&nbsp;»: «&nbsp;OFF&nbsp;», «&nbsp;transition&nbsp;»: 3}  
**Send a Zigbee2mqtt message -** zigbee2mqtt/Ceiling Input 2/set - {«&nbsp;state&nbsp;»: «&nbsp;OFF&nbsp;», «&nbsp;transition&nbsp;»: 3}

---

<div class="post-metadata">

**Author:** ![curing](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/curing/32/22964_2.png) [@curing](https://community.gladysassistant.com/u/curing)\
**Post date:** [October 15, 2026, 4:10pm UTC](https://community.gladysassistant.com/t/scene-lumiere-avec-detection-de-mouvement-2-problemes/10930/7 "2026-10-15T16:10:27Z")

</div>

Hello everyone! I still have an issue when turning off my Hue GU10 lights. I can’t get a smooth fade-out, whether or not «&nbsp;Hue Native Control&nbsp;» is enabled in Z2M. Does anyone have an idea? Here’s an example of a non-progressive turn-off scene

 ![Screenshot 2026-10-15 at 18.08.55](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/0/e/0e3aa082f8f151d4b3e37a4e6d6f20f73e3cb5e7.jpeg)
