# Issue with motion sensor and light bulb in scene

**URL:** <https://community.gladysassistant.com/t/probleme-scene-avec-detecteur-de-mouvement-et-ampoule/6443>\
**Category:** Configuration\
**Created:** [July 18, 2021, 5:50pm UTC](https://community.gladysassistant.com/t/probleme-scene-avec-detecteur-de-mouvement-et-ampoule/6443 "2021-07-18T17:50:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [July 26, 2021, 1:43am UTC](https://community.gladysassistant.com/t/probleme-scene-avec-detecteur-de-mouvement-et-ampoule/6443/4 "2021-07-26T01:43:13Z")

</div>

@mikael Oh I see, after all «&nbsp;after 20:00&nbsp;» and «&nbsp;before 7:30&nbsp;», 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 🙂

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

- Motion detection
- AND after 20:00

another:

- Motion detection
- AND before 7:30

---

_[View the full topic](https://community.gladysassistant.com/t/probleme-scene-avec-detecteur-de-mouvement-et-ampoule/6443)._
