💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

OK, I’ll have a play with it. There are 5 or 6 Harmony activites so it may be a bit messy creating templates for them all or else I can use not OFF = ON.

Hey, i see i can set a ambient light sensor so the lights only turn on when it is dark enough. And i can set a start and end time for the night lights. But could you combine these settings?

Would it be possible to switch between night light and normal light based on the ambient light lux value instead of a predetermined start and end time?
So when the ambient light is really dark i want night lights, if not i want normal lights.

Yes you can. By-pass, Sun, Ambient Light Sensor, The Time Options & The Zone Option are all global settings. They work with “Lights - Switches - Scenes” & “Night Lights”. You can have one or all of them and it must pass every selection you make before the lights will turn ON. The Night Lights - Start Time & Night Lights - End Time is just for night lights to run between the time but all the global settings must pass before the night lights will turn ON.

Currently no sorry. The night lights are set just on night lights time, but thanks for the suggestion and I will add it to the suggestions list.

Wow, this Blueprint really has come a long way, in a short period of time! I just upgarded from 1.5 to 2.4, so many new options… Thanks!

1 Like

@ConTS10 Thanks for your kind words. I am glad you like it :+1:

Having an odd thing with the night lights.

I wish for night lights to run from 10PM to 6AM. Testing last night, they just failed to come on at all, like the time was backwards.

The YAML seems to be looking at start and end time for day lights only? This is where it fails

condition: or
conditions:
  - '{{ include_time == ''time_disabled'' }}'
  - condition: and
    conditions:
      - condition: time
        after: '06:00:00'
        before: '22:00:00'
        weekday:
          - mon
          - tue
          - wed
          - thu
          - fri
          - sat
          - sun
      - '{{ include_time == ''time_enabled'' }}'

But I quite explicitly have both sections filled in.

Any idea what I may have done wrong? It works fine t the desired brightness before 22:00. Thanks!

HI @Blacky, first of all great work! I tried to achieve same results for week without same results.

I may only have a “feature request” that maybe can be useful for someone else. Below mu uses cases:

I use thi automation to manage my led strip around my house after sunset so me, my wife and my daughters can tour around the house at night safely.

The only add is to add also the main light in the equation. What I would like is to suspend timer when main light is turned on and resume it when it is shut down again. I think I can workaround this create as many on and off scenes for every room in which I want to use the blueprint but maybe using scene.create it can be added to be created dinamically. It is possible?

Thank you in advance

@deadwood83 thanks for your question. :slightly_smiling_face:

It looks like you would like the time to be 24 x 7. The “Use The Time Options” is global. In the description below it says “This applies for “Lights - Switches - Scenes” & “Night Lights”.” So if you are using the time option it must also include the time you would like the night lights to run. This is why it is not working for you. Because you are looking for 24 x 7 your bests to just disable this option and just keep the night lights time as is. It will then work perfectly. See below.

Blacky :slightly_smiling_face: :+1:

1 Like

Hi @Jokerigno glad you like it :slightly_smiling_face:

Question: Do you turn ON the main light manually? If so and it is not included in “Lights - Switches - Scenes” & “Night Lights” then you could add this light into the by-pass. If this will work let us now as I will have to adjust one thing for you.

Blacky

Yes I do turn the light manually and it is not in the light list as trigger (but it is as bypass) so if I turn the main light BEFORE entering in the room led lights stay off.

@Jokerigno I could be getting confused. I will PM you.

Hey,
I have a problem with my IKEA motion Sensor.
After a period with no motion detection the Automation will not work . In the morning I have to manuell turn the lights on and off after that the automation an the motion sensor will work perfectly. Right now I can’t say if the problem ist on the ikea motion sensor side or on the Automation side.

You absolute mad lad! Thank you for helping me with my reading comprehension. Works perfectly now.

1 Like

@ozel0t1

This is strange. IKEA motion sensor should be good and the automation should be good.

The automation just reacts to the motion sensor and it has worked here 100% of the time. So the code should be good. :wink:

The IKEA motion sensor, I don’t have one so I don’t know if there are more settings in it or if it is just motion detected or not. Maybe have a look there.

If your setting are not correct in the automation maybe that is causing the problem.

If I was a betting man (that I am not), I would say it is connection issues with the motion sensor and HA.

I would look at the connection between your motion sensor and HA first, then I would look at the motion sensor settings (maybe there is a wake up to save battery’s, sometimes they have motion detected x amount of times before motion is sent, etc), then go through the settings in the automation.

@deadwood83 No problem at all, your welcome.

Enjoy

Blacky :slightly_smiling_face: :+1:

Hi,

I‘m using an IKEA motion sensor as well. When this sensor changes it’s state to „motion detected“ (on), it also delivers an attribute „Dark“ of boolean type to indicate whether it is really necessary to turn on the lights. Unfortunately it does not deliver any LUX value - just this flag.

Is there any chance to incorporate such an attribute to the decision, if the light needs to be turned on or not?

Thanks
Hilmar

@AckerHi @ozel0t1

RE: IKEA Motion Sensors

I have done a bit of digging on the IKEA motion sensor.

On the back you should have a sun and a moon. Select the sun option. It will then work during the day and night. You then can use the sun option in the blueprint to control this.

Some have a time option 1, 5 & 10 min. This if for how long the light stays on for. Select lowest you can 1 min. Then use the blueprint delay time. I haven’t tested this but if your motion sensor is set to 1 min then probably best if your delay time was greater than 1 min 30 seconds. You will just have to try it out and see what works.

Some have a dim option to dim the lights. Don’t know what’s going on here or what setting you should use.

All we need from the Ikea motion sensor is motion is detected or not into HA. This blueprint will do the rest for you.

Blacky :slightly_smiling_face:

New update 2.5

Cleaned up by-pass entity selection.

Enjoy

Blacky :grinning:

Hi,

somehow I get an error in the log that is related to the Night Light function ( using 2.5 )

Blueprint 'Sensor Light' generated invalid automation with inputs OrderedDict ..

and at the end

('night_lights_after_time', '23:00:00'), ('night_lights_before_time', '30:00:00')]): Invalid time specified: 30:00:00 for dictionary value @ data['action'][0]['choose'][0]['conditions'][0]['before']. Got '30:00:00'

as soon as the time is anything between 6 am and 12 pm so morning hours. Afternoon works fine again.

anyone got an idea how to fix that ?

Thanks for this awesome blueprint though !

Check your time selection. 30:00:00 is invalid max can only be 24:00:00 as there is only 24 hours in a day. You should only be selecting max of 12:00:00 then AP or PM.

No problem, your welcome.