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

Hi @Blacky,
first of all thank you for this blueprint. It is great.
But I’m currently struggeling a little. I’ve added some gardenlights into this automation. Now I would like to have them turned on at some point but with only 10% brightness. Once the motion sensor detects a motion, I would like them to turn to 100% for some time and then return to 10% again. At some point (lets say 10 PM) they should be turned off until a motion is detected and then go to 100% brightness. Any hint how I can do that?
Thank you

Couple of questions if you can help please.

1 - what happens if the automation loses sight of a light. After reboot. Power outage etc. I currently have a node red flow that I have almost totally shifted to this blueprint. The final part is if a light has been on for a while. Eg been on 45 mins and no motion. Then I turn light off. Is this dealt with?

2 - I have a light (led strips around a bed headboard) working from motion with sun set in the blueprint/automation. Plus a bypass Boolean. The Boolean turns on at night time with all my other ‘goodnight routine’ to prevent the light operating in the middle of the night from motion. It resets and turns on each day currently on a separate timer. It was 6 am and so it then works again when we are up and about.

I set the bypass to turn off the light when the Boolean is turned on. That works great. Goodnight routine turns the light off and stops it activating for the rest of the night.
At 6am though when Boolean is turned back off, it turns the light on immediately. I can’t figure out what I should enable to stop that happening.

1 Like

Thanks! I figured out the group thing and it works great.

Thanks for the response.

Sorry yes I understand that dynamic features can only apply to entities and not scenes or scripts.
My question was actually, will you be planning to build in an option so that if the light is already on, the automation does not continue?

This would save users having to set up an ON and OFF scene to do the simple check, outside of the automation.

@herbert1910

A input button doesn’t have a state of ON or OFF but you can make it work with a template sensor or one of my other blueprints that will toggle a input boolean.

It will work with a input boolean… just check you are not using a input_button. So your helper will be a toggle.

Blacky :smiley:

@robin8712

Welcome to the community :wave:

That would be done with a script for now in “Scenes - Scripts To Turn OFF” but keep an eye out on updates. I will do a FAQ after the next release.

Blacky :smiley:

1 Like

Hi,
did you find a solution for this? I’m also looking for a solution for this.

@richsimpson

After a restart of HA it will check the site conditions an prereform the correct action. You can test it turning a light ON and restarting HA or have the light OFF with motion detected and restart HA.

This is similar to HA restart but when you turn the by-pass OFF it will check the site conditions. If motion is OFF it will stay OFF, if motion is ON it will turn the light ON as this is what we are asking it to do. So I would say that when you turn OFF the by-pass your motion sensor will be detected (on).

Blacky :smiley:

1 Like

@Snobound2

Nice one… thanks for letting us know :+1:

Blacky :smiley:

@Mattymo

The main function of the blueprint is to check if the trigger is ON and turn a light ON / OFF. Once the light is ON the automation knows this and can see the light / switch is ON. Currently it cant see scenes and scripts. If the light / switch is ON and the trigger is ON or if the trigger keeps triggering when the light / switch is ON then it wont turn your light / switch ON again but the automation stays active. A lot of the operation relies on checking the trigger state and the light / switch state. So if we would like the automation to be disabled (Not continue) when the light is ON then this is where the by-pass option becomes useful.

I think this is the by-pass option. If we had it trigger on motion to turn a light ON and never turn it OFF then…

Hope this answers your question.

Blacky :smiley:

Thank you very much for your detailed instructions. I tried without success. I have tested your Blueprint at a friend and it works. So it is my Systems fault. For testing purpose we deleted everything from the configuration.yaml but the error still came up. Do you have any idea where to look to find the issue?
Thanks a lot.

The only thing I can think of is to delete the blueprint completely. Reboot your HA not a restart but a reboot. Update HA if possible if not that’s okay. Install the blueprint again, fresh copy. And see if that helps.

Blacky :smiley:

So the reboot/power outage. I tried to test. I have a light for kitchen LED strips under cabinets.

Test was:
trigger motion so lights come on.
Wait for the motion to go back to off.
The 5 min timer for the blueprint/automation is running.
after 3 mins I reboot homeassistant.
Everything comes back up and I wait for the remaining 2 mins. Nothing. I wait a full 5 mins (assume resets the whole timer) - nothing.
Waited 10 mins. Nothing.

Is it something I need to do different?

Here is some info to support the query:

Note the immersion switch I have the more info on that. That reset when HASS rebooted so that shows that switch has been off for 10 mins but it been a lot longer.
LED strips is the item on the autoamtion that is still on.

LED strips logbook shows:


looks like it also saw the reboot 11 mins ago.

This is the important bit from the blueprint/automation I think:

@richsimpson

Make sure you are on the latest blueprint version.

I just tested your test here again and it worked. I even put LED light strip. When it restarts the time will be your full 5 min. The logs you shown are triggered ON by motion and not a restart… so your motion is on.

When HA restart you will see this in your automation if the site conditions will allow it to be triggered. So you restart and you will see the count restart example see the 1 second. If you don’t see this reset then your light/switch/trigger is OFF. This helps keep your HA running fast and why the code is written this way.

Once it is triggered on HA restart then you will see this if no motion is triggered and just your light is ON.

90

Please test again and let us know how you go, as I like to keep my mind open just encase I miss something.

Blacky :smiley:

1 Like

Hey the blueprint is simply amazing. It is just soo good :slight_smile:
I have been trying to wrap my head around a scenario and how to resolve it best.

  • I use presence sensors in all rooms to turn of and on the lights
  • in some rooms I use the time option to only trigger the light between 8:00 in the morning and 22:00 in the evening

However, if often get up much earlier and turn on the light manually. This is fine since there is that variation but what I would like to do is that once I turned on the light manually, I want the automation to take over. So once i toggled the light on lets say after 5am in the morning, it would be great if it goes automatically off when there is not presence and goes automatically go on when there is presence again after.

Any idea on how to do this best? I was thinking to create an additional sensor that is some form of combination of the presence sensor itself and a template sensor that only goes on when a toggle has been flipped but that does not activate the automation. Hmmm hehe well anyhow thanks and have a wonderful day.

Yes I did.

Start with creating two scenes, one for the automation to be tiggered and one with lower brightness.

Configure the scenes in the Sensor Light automation, the bright one as “Lights - Switches - Scenes - Scripts *” and the other one in “Scenes - Scripts To Turn OFF”.

Now the automation will use these scenes to dim/brighten your lights.

If you wish, you can create a script to use in “Scenes - Scripts To Turn OFF”, in the script you can configure conditions (like sunset/sunrise) to enable the dimmed scene or to turn the lights off. This is mine currently:

alias: Garden lighting
sequence:
  - if:
      - condition: or
        conditions:
          - condition: and
            conditions:
              - condition: time
                before: "00:00:00"
                after: "06:30:00"
              - condition: sun
                before: sunrise
                before_offset: "00:30:00"
            alias: Morgning
          - condition: and
            conditions:
              - condition: time
                before: "21:30:00"
              - condition: sun
                after: sunset
                after_offset: "-00:30:00"
            alias: Evening
    then:
      - service: scene.turn_on
        metadata: {}
        target:
          entity_id: scene.garden_dim
    else:
      - service: light.turn_off
        metadata: {}
        data:
          transition: 30
        target:
          entity_id: light.garden
mode: single

1 Like

@jeleniain

Glad you like the blueprint.

The only way I can see this and I have never thought about it or tested it would be to have a by-pass in option 2 OFF. Have something turn the by-pass ON @ 22:00 and OFF @ 8:00. Then when you get up early you manually turn it OFF and if your motion is ON the light will come ON and it will stay that way (normal automation operation) until @ 22:00 it will get turned ON again restarting the cycle. Then time is not required.

Blacky :smiley:

That is a good idea, ill try it out :slight_smile:
Thanks!

Dear Blacky,

I spend hours with my friend to find the cause. Root cause is: I am stupid.
I had a second instance of Homeassistant running. The links to import the blueprint pointed to the old instance. Sorry for bothering you and thank you very much for your help. Now it works.

@Wilko

All good it happens to all of us, so your not alone. Glad you worked it out and got it going.

Thanks for letting us know :+1:

Enjoy

Blacky :smiley: