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

I love this blueprint, I’m using it for a few rooms in my house.

However, there is one room where I’m having an issue with it. I’m using scenes to control some cabinet lighting with night glow and motion, and I have it set to only be on with sun elevation. However, it seems that the night glow never turns off during the day. I have three scenes for the different states:

  • Off Scene
  • On, but no motion scene (night glow scene)
  • On, with motion scene

And I do have two toggle helpers, one for “Lights” and one for “Night Lights”. I assume that is correct?

The behavior I am looking for is:

  1. Off during the daytime (off scene is triggered at sunrise).
  2. “no motion” glow scene is triggered at sunset and when motion deactivated.
  3. “motion” scene is triggered at night with motion.

Here is my full yaml:

alias: Basement Bar Night Lights
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    light_switch:
      entity_id: scene.basement_bar_night_no_motion
    end_scenes:
      - scene.basement_bar_night_off
    include_night_lights: night_lights_enabled
    night_lights_conditions:
      - sun_enabled
    night_lights_sun_elevation: 0
    night_lights:
      entity_id: scene.basement_bar_night_motion
    include_night_glow: night_glow_enabled
    night_glow_lights:
      entity_id: scene.basement_bar_night_no_motion
    motion_trigger:
      - binary_sensor.basement_bar_motion_sensors
    time_delay: 5
    boolean_scenes_scripts: input_boolean.basement_bar_night_lights_toggle
    include_sun: sun_enabled
    sun_elevation: 0
    night_boolean_scenes_scripts: input_boolean.basement_bar_night_lights_toggle
    night_time_delay: 5
    include_night_light_control:
      - if_lights_are_on_adjust_when_crossing_over
      - manage_scripts_crossing_over
    include_light_control: []
    include_time: []
    include_night_glow_light_control: []

I really like having a timer in my dashboards for counting down when the lights are going to turn off. I know I can do this with Manual Light, but is it possible to do this or add this option to the Blueprint for Sensor Light?

Thanks so much for this Blueprint, was trying to do a lot of this manually to not much success before I found this project! It’s a really brilliant tool.

I’ve tried searching here: can anyone help as to whether you can manually trigger a dynamic lighting adjustment.

For a room, I have a mode selector (Bright, Cosy etc and Auto which uses this blueprint). For this setup, I’m using the bypass option 3 - Keep the Lights Current State (enabled when any custom mode is to stop the sensor lights).

This is all working OK however, when Auto (sensor light) is activated I want the lights to instantly update to the correct dynamic lighting levels based on lux/sun as normal. Currently, they seem to adjust through based on their Step Values setting. I don’t want to adjust this as it has wider impacts when the lights have already been on.

Hopefully makes sense!

@krische

I have tested it here and can see a scenario that would cause this.

Because your using the sun global condition with the nightlights also using sun and the sun settings are exactly the same. You also using scenes and this to is also part of it.

When it turns OFF with the sun the whole automation turns OFF. Because we are using scenes your night glow stays ON.

I will need to look into this and try to resolve it.

For now you can try 3 options.

  1. Set the sun global condition Sun Elevation Rising to -3 or -2.
  2. In night glow rather than using a scene use light entity and use the night glow light control options. I think you then can leave your Sun Elevation Rising to -4.
  3. Use entities rather than scenes with the light control options and everything works.

Note you also using the same Scenes & Scripts - Toggle Helper in both normal lights and night lights and they should be different.

EDIT: I also notice your global time option has no selection so it won’t run until you select disable or enable.

Blacky :grinning:

@bradgclark

Yes, I included it into manual light as this allowed you to have a longer safer delay with the light being manually turned ON. It gets a bit complicated because you also need to write code to handle the timer being paused, canceled and also when it completes.

This sensor light blueprint normally has a short delay that normally is not manually triggered ON (motion sensor) so using this hidden delay (one you can’t see in the UI) works well and why Home Assistant developed it. We don’t need to handle it like a timer so the code is less complicated. Because this blueprint is massive with a lot of options, making it more complex to see a short delay being reset all the time would probably do my head in and would make it harder to maintain.

So currently there is not an option for this, sometimes the KISS theory is the way to go.

Blacky :grinning:

@nedsland

Welcome to the community.

I just tested it. If you are using bypass and then turn it OFF you lights should adjust back to DL.

Blacky :grinning:

1 Like

Thank you for checking and the welcome! Must be something I’ve setup :grinning:

Hey,
I just updated to 8.4 and created a new automation and it seems to fail. It tells me to check my configuration.yaml which seems to be fine (at least the check does say so).

All I can find are errors like these in the newly created automation:

Quelle: components/automation/init.py:663
Integration: Automation (Dokumentation, Probleme)
Erstmals aufgetreten: 13:18:00 (3 Vorkommnisse)
Zuletzt protokolliert: 13:22:40

Error rendering variables: UndefinedError: ‘dict object’ has no attribute ‘entity_id’