šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

@DriesA

Yea I thought that was going to be the case. The automation needs an ON / OFF stateā€¦ it canā€™t work even if you change the trigger. Can you upgrade your front door sensor? That would be the best way.

Blacky :smiley:

@nicknol

Hi Nick,

Your welcomeā€¦ It is really nice to get this feedback and I am really glad everyone likes it.

Blacky :smiley:

1 Like

I canā€™t, Itā€™s using the standard Doorbird integration, which works with events. I have now created an automation that changes an Input boolean based on the Doorbird event. And then I created a helper-binary sensor based on that switch, so I can trigger your blueprint.

Hi there and thanks a lot for this Blueprint. Iā€™m using it in a dozen of automations.
However, just stumpled across a case I could not easily apply: my Christmas light schedule.

  • I want to turn them on at dusk
  • turn them off at 23:00 to save energy
  • turn them back on at 06:00
  • turn them off at dawn

I tried playing around with sun in combination with time/schedule settings but didnā€™t manage.

Any support would be much appreciated :slight_smile:

1 Like

@DriesA

Nice one, glad you got it up and running.

Enjoy

Blacky :smiley:

@Stifter

Welcome to the community.

The blueprint you need is :high_brightness: Smart Light. It is one of my blueprints and is what I use for my Christmas lights.

Once you downloaded it you will need to use sun elevation and time triggers.

  • Sun Elevation Falling is your dusk, to turn ON your lights.
  • OFF Time is for your 23:00.
  • ON Time is for your 06:00.
  • Sun Elevation Rising is for your dawn to turn OFF you lights.

Enjoy

Blacky :smiley:

1 Like

@Blacky (and perhaps @Stifter)

Speaking about Christmas lights, I have the following situation:

Trigger Condition Action
isNightTime: ā†’ off luminosity below 80lux Xmas lights on
isNightTime: ā†’ on Xmas lights off
luminosity: ā†’ below 80lux isNightTime: off Xmas lights on
luminosity: ā†’ above 100lux Xmas lights off

isNightTime is a boolean helper which I set elsewhere depending on weekday/weekend/holiday and of course time.Typically starting at a time between 22:00 and 23:45 and ending at a time between 6:00 and 7:30.
luminosity is coming from an outdoor sensor.

I want the Christmas lights to be on when itā€™s not nighttime and when itā€™s somehow dark.

I couldnā€™t get my head around how to achieve my goal with one of your blueprints, @Blacky
Hence I created my own one, which might have some issues since it is freshly written by me - without much experience.

@nicknol

Hi Nick, thanks for the info. This is easy.

  1. Your trigger will be the NightTime boolean, but because you would like it ON when the NightTime boolean is OFF we need to invert it. To do this we can create a Template binary sensor helper.

    To create a Template binary sensor, follow these steps:

    • Navigate to Settings > Device & Services > Helpers tab at the top.
    • Click the Create helper button.
    • Select Template and then choose Template a binary sensor.

    Next, provide a Name and Device class of your choice. If applicable, you can link this template to an existing device so it appears under that deviceā€™s details.

    In the State template field, add the code below, replacing binary_sensor.your_night_time_boolean_here with your entity NightTime boolean ID.

{{ is_state('binary_sensor.your_night_time_boolean_here', 'off') }}
  1. Now that is created add it into the trigger.
  2. In Ambient enable it, add your lux sensor, set your Ambient Light - Low Lux Value to 80 and your Ambient Light - High Lux Value to 100.
  3. Add your light in.
  4. Save and your done.

Merry Xmass.

Blacky :smiley:

Thank you @Blacky

what would happen when the luminosity is getting below 80 but it is still nightTime?

my need is that the Xmas lights are not switched on, because it is still nightTime
and as soon as nightTime is over, the Xmas lights are switched on (assuming luminosity is still below 80)

@nicknol

What you do is once you create your template binary sensor helper (as shown above) then you add that helper into the trigger only in a new automation for your Xmas lights.

When isNightTime = ON (assume this is when you are sleeping) the helper will be OFF. Because the helper is the trigger and it is OFF the automation will not run.

When isNightTime = OFF the helper will be ON so now the automation can run. Because we set the ambient condition it can only come ON when it is below 80 and will turn OFF when it crosses over 100.

Blacky :smiley:

Hi,

After many years of using AppDaemon with custom apps, I recently discovered this and decided to give it a try. I had a couple of hiccups, but everything is now working well.

However, I have two issues, and Iā€™m hoping someone might know how to fix them:

  1. When the TV is on and it gets dark, the lights stay off because I have a bypass set up for the TV due to the Ambilight. However, when the TV is turned off, the lights donā€™t switch on automatically. They only turn on after the timer finishes and thereā€™s movement again. (Manually turning the lights on works fine.)

  2. I have kids, and sometimes one of them manually turns off the lights. When this happens, the lights stay off and wonā€™t turn back on until the timer finishes and thereā€™s movement detected again.

Any help would be greatly appreciated!

Keep up the great workā€‹:muscle::+1:

@botany112

  1. If you have a bypass and the bypass is ON it disables the automation.

    • When you turn the bypass OFF, your light is OFF and your motion sensor is ON then it will turn the light ON. No timer.
    • When you turn the bypass OFF, your light is ON and your motion sensor is OFF it will use the Bypass - Time Delay before it turns OFF your light.
    • If you lights is turned ON by a scene or a script then you need to use the Scenes & Scripts - Toggle Helper.
  2. When the automation is running and you turn the light OFF it will turn it back ON when the motion sensor goes from OFF to ON. No timer just need to be re-triggered.

Blacky :smiley:

Hello,
Iā€™ve just imported your blueprint but saving a very simple automation (1 trigger (binary sensor) - 1 light - no other options) always give me the following error while saving:
ā€œMessage malformed: extra keys not allowed @ data[ā€˜triggersā€™]ā€
I assume it has something to do with the selected trigger, but already changed to other binary sensors without luck
Kind regards,
Tim

@houdaerttim

Welcome to the community.

If you can update your Home Assistant then it will be resolved.

Blacky :smiley:

1 Like

Hi again!

I have two automations set up - As I walk into the room (Dining room part of the room) the light turns on, and as I walk left into the ā€œkitchen zoneā€ the kitchen light turns on.

Is there a way of adding to this automation that if presence is detected in the kitchen zone that the dining zone will remain on until all zones are clear? Rather than the dining zone turning off when iā€™ve moved into the kitchen area?

I have it set up this way so that If I only stay in the dining zone - then I dont need the kitchen light to turn on. However, if iā€™ve moved into the kitchen zone - both should remain on until Iā€™ve left the room completely.

Ultimate Goal:

  • Only Dining zone detected - only turn on dining zone and turn off when no presence detected.
  • If Kitchen zone is entered - keep the dining zone on as well while there is detection in Kitchen zone
  • If moving back to dining zone - and remaining there - Dim Kitchen light a little but remains on until both zones detect no presence.

Iā€™m sure this is possible, but possibly outside the scope of this blueprint.

Thanks in advance.

Sorry, I meant the time delay until the automation checks for motion.
Is there any way to trigger it during that delay? For example, if the lux level drops below a certain threshold and the lights are off, it would turn them on immediately instead of waiting for the time delay to finish.

I hope Iā€™m explaining this correctly.

Just come back to looking at using this blueprint as its always seemed so cool, but Iā€™ve never really got it to work. and today is no difference.
just imported (7.3)

Either using a single motion detection or a group of two . which works, I can see the motion entity change to on etc.
Selected a few bulbs in the room. brightness level and temp level.

selected night time between midnight and 7am. for just one light.

nothing else is enabled.

tested a bunch but it sits there with ā€œlast time this activation was activated = neverā€ and if i force it to run actions , it doesnā€™t do anything.
tracing is next to impossible given the complexity of this blueprint. any pointers as to what i can do to work it out??

Hi,
I have set a motion detector as a trigger so that certain lamps are switched on. This also works so far. However, I would like the light to stay on as long as the TV is on or the brightness in the room exceeds a certain value.
I can query my television via media_player.fernseher.
What is the best way to do this?
Regards
Herbert

Iā€™m having a similar problem. I have one automation using it that I setup a few weeks ago and it works great. I tried to setup another one today but cannot get the trigger to fire. Iā€™ve tried multiple trigger entities (that all work and show status change in the logs) but none work and, as with the OP, ā€œlast time this activation was activated = neverā€.

@varsanikr

We the fun begins now.

This is were scenes and scripts come into play.

You are going to have to use scenes in your light input.
Add your helper for scenes & scripts.
Now the exciting part Scenes - Scripts To Turn OFF this is were all your logic will be. You will create scripts to handle ever condition.

In your kitchen off script you will have;

If dining room detected turn light to 50%.
If dining room clear and dining room light is ON = turn off kitchen light and dining room light.
If dining room clear and dining room light is OFF = turn off kitchen light.

In your dining room automation.

If kitchen detected leave light dining light ON.
If kitchen is clear and kitchen light is on = turn off kitchen light and dining room light.
if Kitchen is clear and kitchen light is OFF = turn off dining room light.

To do this you would go to settings > automations & scenes > create your 2 scenes for your lights input and then create 2 off scripts. In the script create new script > add building block > choose then add in the condition and action for each one. keep adding building blocks choose for each one.

Enjoy

Blacky :smiley: