# Fade to sleep?

**URL:** <https://community.smartthings.com/t/fade-to-sleep/77373>\
**Category:** Automation Ideas\
**Created:** [February 9, 2017, 6:28pm UTC](https://community.smartthings.com/t/fade-to-sleep/77373 "2017-02-09T18:28:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LooNTooNs](https://avatars.discourse-cdn.com/v4/letter/l/b5ac83/32.png) [@LooNTooNs](https://community.smartthings.com/u/LooNTooNs)\
**Post date:** [February 9, 2017, 6:28pm UTC](https://community.smartthings.com/t/fade-to-sleep/77373/1 "2017-02-09T18:28:49Z")

</div>

Looking for a smart app to fade 2 lights(hue) over an hour. I would like to fade to zero. I tried Core but it seems to have a max of 10 minutes.

Edit. Built a Stringify flow. Testing now.

---

<div class="post-metadata">

**Author:** ![destructure00](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/destructure00/32/87397_2.png) [@destructure00](https://community.smartthings.com/u/destructure00)\
**Post date:** [February 9, 2017, 8:24pm UTC](https://community.smartthings.com/t/fade-to-sleep/77373/2 "2017-02-09T20:24:44Z")

</div>

These two pistons work together in CoRE to do almost exactly what you’re talking about. I couldn’t get the stock Fade to Level function to work, but this does. You could tweak this and add an “Off” command at the end.

 ![](https://global.discourse-cdn.com/smartthings/original/3X/c/d/cdf181b42c0459aa2318e1d2c99a2086da57ff7a.png)

 ![](https://global.discourse-cdn.com/smartthings/original/3X/8/b/8bbf91b6081a35f578fc147863481cc34078de89.png)

---

<div class="post-metadata">

**Author:** ![rontalley](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rontalley](https://community.smartthings.com/u/rontalley)\
**Post date:** [February 9, 2017, 8:37pm UTC](https://community.smartthings.com/t/fade-to-sleep/77373/3 "2017-02-09T20:37:44Z")

</div>

Gentle Wakeup will also work for Fade to Sleep.

Market Place–\>SmartApps–\>Lights & Switches

 ![](https://global.discourse-cdn.com/smartthings/original/3X/a/6/a6a785cb6123baefd7198ab41c199d45f9f059e9.jpg)

---

<div class="post-metadata">

**Author:** ![LooNTooNs](https://avatars.discourse-cdn.com/v4/letter/l/b5ac83/32.png) [@LooNTooNs](https://community.smartthings.com/u/LooNTooNs)\
**Post date:** [February 9, 2017, 9:06pm UTC](https://community.smartthings.com/t/fade-to-sleep/77373/4 "2017-02-09T21:06:04Z")

</div>

Thanks guys. The Stringify flow worked perfectly as well.

---

<div class="post-metadata">

**Author:** ![MikeWesley](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mikewesley/32/70127_2.png) [@MikeWesley](https://community.smartthings.com/u/MikeWesley)\
**Post date:** [November 30, 2017, 5:24pm UTC](https://community.smartthings.com/t/fade-to-sleep/77373/5 "2017-11-30T17:24:51Z")

</div>

Hi @destructure00,  
I’m trying to replicate this sequence of events on my own Hub, but I can’t work out how to insert the  
`FOR 90 CYCLES DO`  
and  
`LOOP AFTER 20s`  
parts.

I can’t for the life of me find any FOR, WHILE or DO tasks in insert into the activity after the Wait command.  
Where do I find them?!

---

<div class="post-metadata">

**Author:** ![MikeWesley](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mikewesley/32/70127_2.png) [@MikeWesley](https://community.smartthings.com/u/MikeWesley)\
**Post date:** [November 30, 2017, 5:28pm UTC](https://community.smartthings.com/t/fade-to-sleep/77373/6 "2017-11-30T17:28:42Z")

</div>

Well shit…

Looks like you have to turn on Expert Mode in the Settings to see the FOR loops (among other things).
