Night Light

Dear forum,

After many years of using Hue exclusively, I recently switched to Homey Pro and have not regretted this step so far. I finally have all the functions that I was sorely missing. I was able to cover most of my requirements using standard flows, but I am now facing a challenge where I am missing the solution. Unfortunately, I couldn’t find anything suitable in the forum.

My problem is as follows: I have created an evening flow called “Good night”, which switches off all lamps and puts some of them into night light mode. In the morning, this flow is stopped again by an outdoor sensor (if brighter than 50LX). However, if someone goes into the kitchen at night, for example, and the motion detector switches the light on (to bright), it should return to the “Good night” flow after 30 minutes; the light is currently switched off after 30 minutes by the Chronograph app. The same should happen if someone uses one of the light switches (Hue Dimmer), in this case all the lights in the kitchen are also switched off again after use.

My question is how I can ensure that after activating the “Good night” flow, the light returns to the Good night flow after 30 minutes and the light in the kitchen is not switched off?

Many thanks in advance for your help!


Somehow you have to take into account whether the Goodnight flow has run or not, for example store this state in a variable. When switching of a light in the flow of the motion sensor you decide based upon this state whether the light switches off, or set to light to the same Goodnight dim level.

Indeed, when turning off the light you should also check if it is dark outside.

Since Hue outdoor motion sensors do not have a dedicated AND card for LX, use this generic logic AND card with the LX reading of the outdoor sensor:


As per @Rmb comment, the best is to keep a state “Dark outside (y/n)” in a virtual device or a variable for easy maintenance.

Just a thought:
You may have to further fine-tune your night light flow for fluctuating LX levels.
Lmk if you need tips for that.

Many thanks for your tip about the variable. I have created a yes/no query for this

Bildschirmfoto 2024-05-08 um 12.51.03|690x295
Thank you very much for your quick feedback, I have now created a flow and will test it tonight.

Using a virtual device does add some more functionality:

  • you can easily see the status by looking at the device
  • you can easily switch the status to ON using the button of the device

Very nice. Just a tip and a question:

  1. Disabling / Enabling flows is best done only for maintenance/version control. Personally, I find that every flow that is in use or can be used, should remain active. But opinions differ.
  2. These two red marked options seem to be equal? I would suggest a single variable for easier reading.


Hello Fkey,
Thank you for your advice, but I have no experience or idea how to use and set up a virtual device. I have already downloaded the app, but what should I do next?

Hello Rrrrr,
You’re quite right, I’ve now worked on the flow even more, but it’s not working satisfactorily so far. The “Good night” flow is not switched properly, more precisely it is not reset to Inactive in the morning.

Looking much better!

  1. Each time you have activity (for most sensors the activity sensor becomes inactive after 5-10 seconds) you could be starting a new 120s delay. It’s better to use a Chronograph timer that can be interrupted upon new movement or for example:
    WHEN inactive for 120s
    AND Gute Nacht is active

Where’s the good night flow?

Ich würde die Aktion „activate kuche gedimmd scene“ in Ihrem Flow hervorheben, da sie unabhängig vom Status des Nachtflusses ist. Denn man schaltet das Licht immer auf die gleiche Weise ein, aber auf unterschiedliche Weise aus.

Hello Rrrrr, here is the good night flow.
I think there was a problem with the Hue Outdoor sensor. This was suddenly no longer recognised correctly by Homey (after restarting the Hue app it is now working again) and so the new Lx level could not be reported in the morning to update the status.
So that the Good Night Flow could be set to No again.

I modified the Advaced Flow a little further and everything ran smoothly during testing.

Vielen Dank für deinen Hinweis. Ich werde es testen