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

@serialoverflow

Yes you can :partying_face:… it is all there as per your suggestion. The way we do this is through the bypass. I will walk you through the steps. Looks like you know what your doing so it will not be a full detail step by step but if you need more information just ask.

  1. Create a toggle helper (boolean) call it “Party Mode” or anything you like.

  2. In the bypass options, you have 3 options to choose from. Each option is for what happens (action) when you turn ON your “Party Mode” boolean. What would you like the light to do?

  3. Then go through each sensor light automation and choose what bypass option you would like for your lights when you turn ON your “Party Mode” boolean. Select your option and add your “Party Mode” boolean into the correct input (option) you selected. Now all your automatons will disabled (locked) and all your lights will be as per your bypass selection (ON, OFF or Keep current state) when you turn ON your “Party Mode” boolean. You can still manually turn your lights ON or OFF, do anything you like as the automation is disabled (locked).

  4. When the party is over and you turn OFF your “Party Mode” boolean it checks the site conditions and reacts. The “Bypass - Time Delay” is like your “Time Delay” it works like a buffer. So when you turn your “Party Mode” boolean (bypass) OFF and no motion is detected it gives you a bit of time before the actual light will turn OFF so your not standing in the dark. If motion is detected the automation runs as per normal.

  5. If you like you can opt to use the “Bypass Auto OFF Option” so if you forget to turn your “Party Mode” boolean OFF it will do it for you. Since you’re using a single toggle helper for your ‘Party Mode’ boolean (bypass), you only need to select this option once, even if you’re using it in multiple automatons.

Not bad hay. Let me know if this works for you.

PS: This works the same if you have anything else you would like to do. Some example are.

  • Party Mode
  • Guest Mode
  • Sleep Mode
  • Movie Mode
  • Cleaning Mode - Lights ON
  • Upstairs Lights ON
  • Downstairs Lights ON
  • Bedroom Lights OFF
  • Smoke Alarm “Alarm” - Lights ON
  • Alarm System “Alarm” - Lights ON
  • Etc

Blacky :smiley:

2 Likes

Ok I’m struggling. I was using your Blueprint for a couple years. Decided to moved everything to a dedicated machine vs a docker container. Set everything up “fresh”. Don’t remember the version I was on but lots more stuff added. I’m close but missing something and its something stupid I’m sure I’m missing.

I’m a fairly simple use case. Want the motion to trigger a single light during the evening. Just using the time option 7pm-10pm, shutting the light back off after 5 mins of no motion (this portion works). Then starting a 10PM until 7am turn on a different light (actually two lights) and same shut off after 5 mins of no motion. Using just the time option again on night lights. Motion doesn’t seem to trigger the night lights only the evening one. All the entries are entities and did enable the night time time option and set the times. Any help would be appreciated.

@twoolums

Hi Todd, welcome to the community.

I can’t see your YAML of your automation but my bet is that your global time option from 7pm to 10pm is the problem. This must include your night light time as it is global. Please adjust it from 7pm-10pm to 7pm-7am. Once you do this it will all work.

Blacky :smiley:

Sorry about the Yaml. I’ll give that a try, we shall see tonight. Thank you!

alias: Night Time Motion Lights
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.aqara_motion_sensor_occupancy
    light_switch:
      entity_id: light.basement_lamp
    include_time: time_enabled
    after_time: "19:00:00"
    before_time: "22:00:00"
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - switch.back_yard1
        - light.aqara_wall_switch_us
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "22:05:00"
    night_lights_before_time: "07:00:00"
    night_lights_entity_state: []

@twoolums

Thanks for your YAML… yep adjusting the global time to include your night lights time will work. Also note since you said “but lots more stuff added” there is another option now if you would like your lights to transition to night lights if your lights are ON. See below.

Blacky :smiley:

New update 6.7

Your lighting experience, your way – take control and customize it to perfection! :bulb::sparkles:

Maintenance :toolbox:

  • Update the description in “Lights - Switches - Scenes - Scripts” and “Night Lights” to include the new option to select “labels”. The updated description should read:

    NOTE: Only entities can be used. Areas, devices, and labels are not supported.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

For the bypass option any way to use something besides an entity per bypass? I’m considering switching from my custom Node Red setup to this setup. In node red I have a few configs that dynamically allows me to set variables in a map to motion_enabled on/off. But to move to this setup I believe I would have to create a helper per light for a few dozen lights.

Is that above correct or am I missing something?

Ive had a really good look through all the documentation, and I can see that this would be an awesome blueprint to use all over the house. For me, I have a hue sensor in a hallway and trying to use the lux sensor to provide some light using a hue lamp, but find that no matter what I do in the lux settings, the light always comes on. Do love this and will pursevere but if there are any tricks and tips id be stoked to get amongst those!!

@sstarcher

It all depends what you are trying to do. There are many options that allow you to set up your lights and it all has been developed to evaluate the site conditions. They are

  • Sun
  • Ambient
  • Time
  • Device Tracker
  • Night Lights

You then also have bypass and many options in there. The bypass it is very powerful. I don’t think you have to set up a helper per light. Maybe if you can give me more on what you are trying to achieve I can help you more.

Blacky :smiley:

@tipananz

Welcome to the community :wave:

Thanks for reaching out when you get stuck. Because I can’t see your YAML of the automation I am not sure what is happening. My guess is that your haven’t enabled the ambient options. See below.

If this is not the case 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:

Sorry I should have been more specific. I’m looking to stop the light from turning off even if motion is no longer detected.

I have custom automations for Sun/Ambient/Time/Night Lights via Node Red that I’m playing with transitioning to Adaptive Lights.

My current setup for motion is a custom NodeRed. I have Inovelli switches and when I press the config button I want to disable motion for that switch/room.

  • In NodeRed I detect the config button being pressed
  • Set the switch LED to purple(motion disabled)
  • Set a variable map in node red with a key that contains the switch name to “true”

If the button is pressed a second time

  • Set switch LED to blue
  • Set variable of switch name to false

In my logic for motion detect if that value is true above than it does nothing. If that value is false it works as normal.

@sstarcher

Yes this all can be done but your indication LED will have to be done outside of the automation and as long as your Inovelli switches button does not control the lights and it is a independent switch. The Inovelli switches must have a ON/OFF (true/false) state.

Try a basic automation with your motion sensor, lights and a bypass option. You only need to select one option. Since you would like the light ON then select bypass option 1 and enter your Inovelli switche entity into the input for bypass option 1. Then test it out.

If you have any questions just ask.

Blacky

Hi @Blacky
Thanks for the reply!

I do have the ambient option enabled. I have temporarily disabled the automation while I try to figure it out, but the yaml is below for you to have a wee lookie at - which I really appreciate!

alias: Auto - Main Hall Motion Sensor Light
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.hall_occupancy
    light_switch:
      entity_id:
        - light.lamp
    include_light_control: []
    light_brightness: 31
    light_transition_off: 4
    include_dynamic_lighting: enable_lux_controled_brightness_inv
    dynamic_lighting_lux_sensor: sensor.hall_illuminance
    dynamic_lighting_heartbeat: 1
    include_bypass: []
    include_sun: sun_disabled
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - light.lamp
    include_night_light_control:
      - use_brightness
      - use_transition
      - if_lights_are_on_adjust_when_crossing_over
    night_light_transition_off: 3
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "22:00:00"
    night_lights_before_time: "06:00:00"
    dynamic_lighting_min_brightness: 60
    dynamic_lighting_min_lux: 0
    dynamic_lighting_max_lux: 100
    night_light_brightness: 35
    time_delay: 2
    dynamic_lighting_max_colour_temp: 6100
    dynamic_lighting_min_colour_temp: 2700
    dynamic_lighting_sun_elevation_start_rising: 1.5
    dynamic_lighting_sun_elevation_end_rising: 35
    dynamic_lighting_sun_elevation_start_falling: 35
    dynamic_lighting_sun_elevation_end_falling: 4
    dynamic_lighting_step_value: 10
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.hall_illuminance
    ambient_light_value: 120
    ambient_light_high_value: 610
    ambient_light_options: ambient_light_option_enabled

@tipananz

Thanks for your YAML. You are using Dynamic lighting and Ambient Options. They are both different things. Lets try and just use the Ambient Options first and get that to work.

  1. First lets disable Dynamic Lighting as shown below.

  2. Select use brightness. You have selected 31%. You can also select colour temp & Transition if you like.

  3. Option 1: As shown below it looks like you are using a low and high value… if so we will need to select “No” for the site conditions. What this will do is, if the LUX is below 120 and you have motion the light will turn ON. If the LUX value goes above 610 or no motion then the light will turn OFF.

    Option 2: If you set it up as shown below. What this will do is, if the lux value is below 120 the light will come ON. It will not turn OFF regardless of any lux value once the light is ON. You have to have no motion and it will turn the light OFF.

  4. All your night lights look good, but remember the Ambient Options are global so it also applies to night lights.

PS: If you would like to use dynamic lighting then let us know and I can help here.

Let us know if this helps.

Blacky :smiley:

@Blacky

Thanks for the tips here - that’s awesome. Im going to give these a go and see how we get on - I do like the idea of dynamic lighting for this area as its a hallway with very minimal natural light - but, will see how this goes and get my head round this first before attempting to tackle more.

I am new to HA and I can see that your blueprint will likely be so useful in all areas of the house so am stoked to have found it. Thanks for your efforts.

@tipananz

Sounds good. If you would like me to help with dynamic lighting then if you can give me what you are trying to do then I can help. You can also look at the FAQ on dynamic lighting.

Blacky :smiley:

Thanks
I think what I was trying to achieve is, turn the lights on according to whether there is motion, using the dynamic settings but also turn off after a certain amount of time irrespective of the dynamic settings.

What I found was, the lights would just always come on when motion was detected. To be fair, I couldn’t work out which of my settings was causing an issue!

Hey Blacky,

thanks for your awesome blueprint. I’ve planned this to use in all our rooms, but there is one thing i dont understand.

The situation:
I have one led-panel in the floor. The panel should only be activated, if the lux value is below 50 lx. The other option works perfectly nice, for example the color temp and brightness in correlation with the actual time and also night lights.

This panel is every time activated with the motion sensor, with a minimum of 5% i guess. Where does this come from? Any advice would be apreciated :wink:

Thank you

Screenshot from 2024-05-29 09-53-37

alias: Flur Deckenleuchte Süd
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.flur_bewegung_sud_occupancy
    light_switch:
      entity_id:
        - light.flur_deckenlampe_sud
    time_delay: 1
    include_light_control: []
    light_transition_on: 3
    light_transition_off: 5
    include_dynamic_lighting: enable_sun_elevation_colour_lux_brightness
    dynamic_lighting_max_colour_temp: 4000
    dynamic_lighting_min_colour_temp: 2700
    dynamic_lighting_dead_zone: 6
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - light.flur_deckenlampe_sud
    night_time_delay: 1
    include_night_light_control:
      - use_transition
      - if_lights_are_on_adjust_when_crossing_over
      - use_colour_temperature
      - use_brightness
    night_light_brightness: 5
    night_light_colour_temperature: 2700
    night_light_transition_on: 3
    night_light_transition_off: 5
    night_lights_after_time: "22:00:00"
    night_lights_before_time: "06:00:00"
    night_lights_conditions:
      - time_enabled
    dynamic_lighting_max_lux: 50
    dynamic_lighting_min_lux: 0
    dynamic_lighting_lux_sensor: sensor.flur_bewegung_sud_illuminance_lux
    light_colour_temperature: 3000
    dynamic_lighting_step_value: 3
    include_ambient: ambient_disabled
    ambient_light_value: 40
    ambient_light_options: ambient_light_option_disabled
    ambient_light_high_value: 100
    include_sun: sun_disabled
    dynamic_lighting_heartbeat: 1
    dynamic_lighting_max_brightness: 100
    dynamic_lighting_min_brightness: 0

@krasimov

Welcome to the community

I have been able to recreate this and I can see there is a bug in option 8 of dynamic lighting. I will have to fix this. For now if you like you can enable the ambient option, enter in your lux sensor, select yes and set the low lux value to 50. This will only allow the automation to run when it is below 50. Note, this is a good way of doing it anyway and is what I would do.

Thanks for pointing this out and stay tuned for the fix / update.

Blacky :smiley:

mighty stuff, kudos @Blacky

I wonder though if the blueprint allows conditions at all.

Light: a zigbee switch which s1/s2 are hardwired to a physical switch on a wall.
Trigger: a zigbee door sensor.
Goal: when the light is OFF, do the automation. When the light is ON - do not do any (==do not switch off after timeout or by a trigger).

I can work it out using additional helpers/devices/automations but I was wondering if the blueprint can already “just do it” already? Thanks

ps. how to donate? :slight_smile: