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

@SpaceGlider

In the FAQ I show examples of template sensors. This is the one that would best suit your needs. It will auto turn OFF. Once created you sue it in the trigger rather than your door/window sensor. Click Here

You could also create (add to this template sensor) a template binary sensor that has auto OFF with it turning OFF if the window/door turns OFF.

Note: I also have other blueprints that handle this like :door: Closet, Pantry, and Cupboard Lighting just depending on what you are trying to do.

Blacky :smiley:

1 Like

Iā€™m new at setting up this blueprint, but it looks so amazing! Iā€™m trying to have two lights switch.outside_front_porch_lights and switch.outside_garage_door_light turn on at sunset and turn off at sunrise. Hereā€™s my yaml. What am I doing wrong?

description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    time_delay: 5
    include_sun: sun_enabled
    include_night_lights: night_lights_enabled
    night_lights_conditions:
      - sun_enabled
    night_lights:
      entity_id:
        - switch.outside_front_porch_lights
        - switch.outside_garage_door_light

Thank you!

Hi!
Iā€™m trying this blueprint for the first time to replace my light automations.
Iā€™m having trouble with the bypass. I want to use 2 different bypasses:

  1. Sleep mode: I turn this helper ON to prevent my pets to trigger the lights while Iā€™m sleeping.
  2. Manual mode: I turn this helper ON to avoid lights from turning off, when I want to control them manually.

When I use them both simultaneosly the whole automations stops working, lights donā€™t turn on/off anymore.

Am I doing anything wrong here?

@bmbouter

Hi Brian,

If you would like to just turn the lights ON and OFF at sunset and turn off at sunrise then use this blueprint :high_brightness: Smart Light - Entity - Sun Elevation - Ambient & Time Triggers. Once you installed it I have provided your YAML for you to copy / paste it in. Look in Trigger - Sun Elevation and adjust your falling and rising settings to sure your requirements. Then sit back and enjoy.

alias: Outside Front Lights
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_sun:
      - sun_falling
      - sun_rising
    light_switch:
      entity_id:
        - switch.outside_front_porch_lights
        - switch.outside_garage_door_light

Blacky :smiley:

1 Like

@PeL4

Everything looks good! No matter which bypass you use, it will disable the automation. When you select options 1, 2, or 3, youā€™re simply deciding what happens when itā€™s turned ON.

For example, if your light is ON and you activate Sleep mode, the light will turn OFF, as per option 2. If you turn ON Manual mode, the light will remain either ON or OFF, depending on its current state.

When any bypass is active, the automation is disabled. For the automation to function, all bypasses must be OFF. If multiple bypasses are ON at the same time, the entire automation will stop, allowing the lights to be controlled manually only.

Also note the Bypass - Time Delay

Blacky :smiley:

1 Like

For some reason this is what happens with my occupancy sensor:
image

The device only registers a occupancy, but it somehow triggers the automation twiceā€¦

Hi,

I have used the blueprint succesfully in the past and its working perfect when I dont have night mode. The second I do have nightmode on, it doesnā€™t work. Day or nightā€¦

This is what I have setup:

Tried to do it in once picture by zooming out. Please let me know if its unreadable.

At first I filled in Night Lights - Entity State but then I read thats only when you want the nightlight to be triggered by an entity state and it this point I would be fine with the automation being triggered by time. So what am I missing?

Hello Blacky, thank you very much for the Blueprint. I am new to Home Assistant and unfortunately not very experienced in such things. I use the entities from Homematic as an example oil a presence detector with which I want to switch a light on and off and this depending on the time of day. Unfortunately, I canā€™t get it to work in the Blueprint. Where could the error be or what should I post to get help? Many thanks in advance.
Thank you very much

How can I configure my motion lighting such that it always turns on, but during certain hours it holds the lighting on? The current state bypass seems close to a solution. But IIUC, it would also prevent the lights from coming un during the bypass period.

Hey Blacky, thank you so much for your very detailed explanation! I really had a complete misconception of what this toggle helper does. It didnā€™t even cross my mind that creating and assigning one is all that is required from me. Itā€™s a little bit hard to test my automations right now, but I am confident itā€™ll work now.

Thanks again for taking the time and helping out so quickly!

Best,
Chris

Edit: works like a charm! :heart:

@Hometoza

At 10:25:26 = Switched on triggered by automation corridor light triggered by the status of motion detector occupancy

then

At 10:25:27 = Switched off triggered by automation corridor light triggered by the status of motion detector occupancy

For some reason it is triggering ON and OFF in 1 second. Do you have a time delay? The time delay is under Lights

Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā€œ</>ā€ and paste code in there.

Blacky :smiley:

@Limbeck

Welcome to the community.

I am not sure what domains you used for lights. If it a scene or script could you provide what each one does and maybe the entity used in them.

Then could you also please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā€œ</>ā€ and paste code in there.

Blacky :smiley:

@derBremser

Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā€œ</>ā€ and paste code in there.

EDIT: I see you deleted a post so I not use if you now got it working.

Blacky :smiley:

@darryldaytona

Welcome to the community.

You probably be best to create scripts for Lights - Switches - Scenes - Scripts & Scenes - Scripts To Turn OFF.

Lights - Switches - Scenes - Scripts = Just tun the light ON

Scenes - Scripts To Turn OFF = Turn the light OFF but during certain hours it holds the lighting ON and when X time if light is ON turn OFF. So there would be a IF Then for this to happen.

Make sure you also use the Scenes & Scripts - Toggle Helper

Blacky :smiley:

@charlydelta

Hi Chris, nice one thanks for getting back to us.

Enjoy

Blacky :smiley:

1 Like

Big thanks. I configured as needed now it works as expected.
20$ for your motivation support it!

Thanks for the awesome blueprint. Iā€™ve been able to replace all my existing motion-activated light automations with this blueprint and works solid. One scenario Iā€™m trying to work with involves NOT doing anything if the light is already on. Currently if the light is on and the automation is triggered by motion, it takes over control of the light and turns off the light following the motion sensor clearing up.
Iā€™d do this in an automation by using a condition that runs the automation only when the light is OFF. Is there a way to achieve the same with this blueprint, effectively ONLY taking action if the light is OFF.

Thank you!

Hi Blacky, thank you for your amazing work on all your blueprints, they have transformed by Home Assistant experience! I hope you kindly assist me with the below query, perhaps what I am trying to achieve is already possible with the blueprint but I am just not seeing how!

I am currently using the ā€˜Sensor Lightā€™ blueprint to automate turning on flood lights in my driveway when my camera (Unifi Protect) detects a person or vehicle in the driveway, this is working flawlessly however currently triggers anytime of day or night. I wish for it only to trigger at night time when it is dark outside.

I am aware of the ā€˜Ambientā€™ and "Sun Elevationā€™ features of your blueprint which are designed to achieve this however my camera integration provides a binary sensor (ā€˜is_darkā€™) which is ON when the camera detects it is dark and the Infared light on the camera is active. Is it possible to use this binary sensor in the blueprint, i.e. only turn on the flood lights if ā€˜is_darkā€™ is ON. In the meantime I am using the ā€˜Sun Elevationā€™ feature.

Thanks again.

Few questions for my scenario. I have a light in my desk where is located also a motion sensor. I would like to open the light when lux in the room is low plus I want to control the lux of the light to be connected with the light lux in the room (more room light less lux in the light). Last if I open the main light (with wall switch) I want to turn off the desk light.
I have manage to do the most except the dynamic lighting and the main light to turn off the desk light

@SeRG1k17

No problem, your welcome and thanks for your donation it does help me stay motivated.

Thanks again!

Blacky :smiley: