# Tutorial - Advanced automatic light control with flows

**URL:** <https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877>\
**Category:** Tutorials\
**Tags:** tutorial, flow\
**Created:** [December 4, 2019, 10:31am UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877 "2019-12-04T10:31:47Z")\
**Posts on this page:** 12\
**Page:** 3

<div class="post-metadata">

**Author:** ![Felix\_oslo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/felix_oslo/32/33969_2.png) [@Felix\_oslo](https://community.homey.app/u/Felix_oslo)\
**Post date:** [September 3, 2021, 5:15pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/43 "2021-09-03T17:15:31Z")

</div>

It should be possible to store the level before turning it off, and then set the DimLevel again, but if you do to, the dimmer turns on again….

---

<div class="post-metadata">

**Author:** ![RogerSt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rogerst/32/12432_2.png) [@RogerSt](https://community.homey.app/u/RogerSt)\
**Post date:** [September 15, 2021, 3:20pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/44 "2021-09-15T15:20:01Z")

</div>

I have sporadically experienced (mostly not!) the same thing with the fibaro dimmer 2 as well as the RoBBsmarrt zigbee dimmer.

When the light is turned on, sometimes it stays off because the dimmer is set to level 0. In the end I have solved this with every ‘on’ command, after 1 second setting the dim level to a certain fixed value.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Cheggen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cheggen/32/27654_2.png) [@Cheggen](https://community.homey.app/u/Cheggen)\
**Post date:** [September 23, 2021, 10:40pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/45 "2021-09-23T22:40:10Z")

</div>

Hi Marvin!

Thank you for a great tutorial!  
I have a conundrum i want to run by you, you see i have been looking into organizing the scenes in the same way as you do, but the more i have been thinking of it, the more i seem to realize that we are not realy gaining any flexibility by introducing that (“virtual”) layer of abstraction.

so basically my argument is this; if you have a virtual switch for each scene, that starts a dedicated flow for the scene, why not trigger the flow directly? as far as i can see it would simplify the complexity and remove the task of turning all the other switches of.

Im looking forward to hear your take on it 🙂

// Christian

---

<div class="post-metadata">

**Author:** ![Marvin\_Schenkel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marvin_schenkel/32/10195_2.png) [@Marvin\_Schenkel](https://community.homey.app/u/Marvin_Schenkel)\
**Post date:** [September 24, 2021, 10:59am UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/46 "2021-09-24T10:59:15Z")

</div>

Hi Christian,

Good question and interesting look on the situation. The reason I use the virtual layer is so that I can always check which scene is currently active (by looking at the state of the virtual devices) and use that in other flows as a condition. If you are not interested in this then I think you can safely omit the virtual layer and just use “scene flows” directly.

Marvin

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 24, 2021, 2:09pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/47 "2021-09-24T14:09:31Z")

</div>

For anyone interested, I just found out about the [Zone Luminance app](https://homey.app/en-gb/app/com.zoneluminance/Zone-luminance/).  
Just like Zone Activity does for motion- and contactsensors, you can replace or add, or remove your 2nd or 3rd luminance sensors this way, without the need to repair all related flows.

Also the [Zone Memory app](https://homey.app/en-gb/app/com.sdn.zone-memory/Zone-Memory/) can come in handy!

---

<div class="post-metadata">

**Author:** ![convert23](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/convert23/32/33841_2.png) [@convert23](https://community.homey.app/u/convert23)\
**Post date:** [October 20, 2021, 7:41pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/48 "2021-10-20T19:41:42Z")

</div>

Hi Marvin, could I use this great tutorial and translate it to Czech?

---

<div class="post-metadata">

**Author:** ![Marvin\_Schenkel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marvin_schenkel/32/10195_2.png) [@Marvin\_Schenkel](https://community.homey.app/u/Marvin_Schenkel)\
**Post date:** [October 21, 2021, 6:50am UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/49 "2021-10-21T06:50:23Z")

</div>

Of course :). Let’s share the \<3 as much as possible

---

<div class="post-metadata">

**Author:** ![Carolus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/carolus/32/37135_2.png) [@Carolus](https://community.homey.app/u/Carolus)\
**Post date:** [December 2, 2021, 4:38pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/50 "2021-12-02T16:38:29Z")

</div>

As a IOS user, I find it much and much more easier to define and maintain scenes in Homekit.  
You can use the Virtual Devices that were created in the example Homey flows above for that.  
Using the Homeykit app, these Virtual Devices will also become visible in Homekit.  
Then create a new Homekit automation that starts whenever the specified VD becomes active and as action starts a predefined Homekit scene.

This way I use the best features of both Homey and Homekit combined.  
I use Homekit mainly for creating scenes and I use Homey for the flows.

---

<div class="post-metadata">

**Author:** ![pilapila](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pilapila/32/30426_2.png) [@pilapila](https://community.homey.app/u/pilapila)\
**Post date:** [March 8, 2022, 8:55am UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/51 "2022-03-08T08:55:27Z")

</div>

Thanks for excellent post. How can I best include different automatic dim levels during the day? Standard for me is 95%, but in the afternoon/evening it would be nice to have a more dimmed light (20-30%) and decreasing until bedtime. Should I use IFFTT or other apps? Use the clock? Or do I need to make several flows with different time points using the clock or luminance option?

---

<div class="post-metadata">

**Author:** ![Sylv1](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sylv1](https://community.homey.app/u/Sylv1)\
**Post date:** [July 6, 2022, 4:46pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/52 "2022-07-06T16:46:16Z")

</div>

Hello, did someone try to do the same with the new advanced flow ? 🙂

---

<div class="post-metadata">

**Author:** ![Hamster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hamster/32/16580_2.png) [@Hamster](https://community.homey.app/u/Hamster)\
**Post date:** [January 10, 2023, 3:44pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/53 "2023-01-10T15:44:43Z")

</div>

> [@pilapila](#):
>
> How can I best include different automatic dim levels during the day?

You can create a variable (for example PreferedDimLevel) and change that variable to the dim level you would like during the day.

So several flows for changing the PreferedDimLevel, and flows for turning your lamps on to a dim level (or put everything in one Advanced Flow).

---

<div class="post-metadata">

**Author:** ![Glenn\_Seegers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/glenn_seegers/32/8353_2.png) [@Glenn\_Seegers](https://community.homey.app/u/Glenn_Seegers)\
**Post date:** [July 20, 2023, 5:22pm UTC](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877/55 "2023-07-20T17:22:13Z")

</div>

Can you please post in english or else it is a little difficult to help you.

[Previous page](https://community.homey.app/t/tutorial-advanced-automatic-light-control-with-flows/21877.md?page=2)
