In a hallway, I have installed a SmartThings motion sensor and a Hue lightbulb.
What I am trying to achieve is that, the light should ONLY turn on if it’s after sunset and motion is detected. The light should NOT turn on if motion is detected and it’s during the day.
I know I can create an action with 2 events (if motion is detected and if at sunset) but that won’t work as sunset only occurs once. I know I can also create an action with 2 events (if motion is detected and if after this specific time) but that is a huge pain as you will have to adjust it constantly to be this hour and that hour especially since the system already knows what time sunset is based on zip code or hub location. Not only that, but this is all assuming that the code statements for above are actually using an “AND” operation and not an “OR” operation which I have a feeling it might unfortunately be an “OR” which wouldn’t work.
What I’m hoping to achieve is an action with the following 2 events together in an “AND” operation…
- If motion is detected
- If after sunset
Such with that, the light should only turn on if it’s after sunset AND motion is detected.
I’m hoping I don’t have to create another device type with custom code as this seems like a very very basic piece of functionality in a system based on automatic schedules so I’m sure I’m missing something, if so, I’m sorry for the question.
Thanks all for any help!