Turn on light, switch, scene, script or group based on motion, illuminance, sun (+ more conditions)

This is where I feel webcore is superior, its to bad it hasnt been ported over to HA

**edit

Just to be clear, I mean in regards to how straight forward I find it to be. I’m sure HA will feel better to me the more I use it.

thx a lot!

You are right, I tried it with a scene as target entity and the restarting of the automation was somehow not working in that case. The first condition in the blueprint is false, but even though a new automation is triggered, somehow this did not cancel the previous running automation.
I have now added a check in the fist condition to check if the target entity is a scene. This seems to fix this issue, so scenes should work now after you import the new version of the blueprint :slight_smile:

Hi,
thank you for your blueprint.
I use your blueprint to trigger a scene depending on the brightness. Unfortunately, it no longer seems to check the brightness when triggering a scene in the first condition. As soon as I switch only one device, it works without problems. Have you tried this?

I think I see a mistake in the first condition indeed.
I have updated the blueprint code, could you retest it please?

How does one go about updating their older code to the new version?

Thank you for your quick reply. It looks like only scenes are working now and single devices are no longer working.

Is it possible to set the light to a 30% dimm level?

I think you have to remove the blueprint and reimport it.

1 Like

I noticed that yesterday as well and created another update to fix that, please try the new version.

Yes, define a scene with your desired brightness and use the scene as the target entity. Also define a target off entity (light) in that case.

1 Like

Thanks
Another short question, when i will, that the light only go on if the lux is under 20, how to configurate the helper?

Instructions on how to configure the illuminance cutoff value helper entity are in the first post

Yes but i don’t understand it. My configuration is:


The light turn over 10 lux on.

Nice work on the blueprint. I’m a novice so I had to read/re-read the posts but it’s now working in my home (I’m pretty sure). Created a scene for the light so it’s basically at a nightlight brightness/color when motion is triggered. Like another poster, the “seconds” vs. minutes for wait time got me. Took me a while to find that gem. I’ll have to remember that moving ahead. Just because I can type a value into a field doesn’t mean HA is going to automatically go with my interpretation of the parameter! Again, thanks.

The screenshot you are showing is configuring the input_number helper. That is not the place where you can set the actual (threshold) value. You can do that from the developer tools, or via a service service: input_number.set_value.
Easiest is just to go to your HA menu → developer tools → lookup your input_number and use the slider.

1 Like

The light that I included in the scene no longer turns on at full brightness outside of the automation running. I must have missed something. Not sure of the sequence. Create the scene for the device which then becomes an entity of that device. Then use that “scene” entity as the target entity in the automation?Thanks.

Reading the documentation about scenes. I must need to do a reset of the scene to the original state but I’m not sure how to accomplish that. I’ll keep checking.

If you want to switch between two different settings of a light (say brightness 50% and brightness 100%), I would just define two scenes. Then use this blueprint or another automation to set the light to the correct scene based on the logic you wish.
I’m using two automations created with this blueprint for instance to set a hallway light (with a scene) to a low brightness at nighttime, and full brightness at daytime (using another scene).

Thanks for the reply. I was heading in that direction. What I haven’t figured out yet is what happens when you introduce another variable like google or alexa into the scenario.

  1. 10pm - 6am - if motion detected, turn on a light using a scene of 2% brightness/soft color, turn off after a minute or so.
  2. Any other time of the day, motion not active, ask google or alexa to turn on the upstairs hallway light (the light in #1) but at 100% and daylight temperature.
    #1 works like a champ with your blueprint & an automation set up (time before, time after, wait time helpers configured).
    #2 turns on the light but at the “nightlight” scene I set up in the automation using your blueprint.

So, I set up a 2nd scene at full brightness. If I call it, the blueprint then turns on the light at whichever “scene” was last used. That’s what led me to the initial state setting referred to in the HA documentation, I’m not sure I’m ready to to get into the yaml code worm-hole yet. I’ll keep looking and I appreciate the work you’ve done.