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

I had been having trouble with my automation after upgrading from V2 top V7. I do not use bypass, but after much debugging, I found that the bypass list was populated with bypass_disabled. It looked like this:

I removed it and made the list empty by editing the yaml:

include_bypass: []

This solved the issue. This may be too much of an edge case to matter, and I guess I could have remade the automation easily enough, since its a blueprint, but thought it would be good to let you know. It could probably be solved with an additional check in the bypass enabled check.

This is the trace where I found it. I can share the whole trace if it is helpful


@Blacky - are there any current problems known?
I have the most simplest of setups for testing purposes but it doesn’t work. I tested it with a manual automation and it works fine. Light works, sensor gets occupied.

The YAML looks as follows:

alias: Test
description: ""
action: []
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.motion_sensor_hall_occupancy
    light_switch:
      entity_id:
        - light.hall_ceiling
    time_delay: 2
    include_light_control: []
    light_brightness: 1

I’m not fully understanding the capabilities of this blueprint :frowning: Can somebody please let me know if it would be possible to use this using a grouped “outdoor lights” and grouped “average outside lux” sensors as well as a outdoor motion sensor to do the following:

  1. Lux Value 100 and below: Turn On the Lights in ‘Night Mode’ dimmed
  2. Motion is detected turn them to full brightness and go back to dimmed after no motion
  3. Lux Value 100 and above: Turn off the lights completely.

Ideally the Lux value should be after its been above/below for 15 minutes, But I can live without that.

Or is this (turn on dimmed at ‘dusk’, full brightness on motion and off at dawn) out of the scope for this blueprint and I should just write my own basic boring automation for it.

@alexbbt

Going from V2 to V7 there are many thing you had to do along the way. You can see them in the FAQ down the bottom. Best to just create a new automation fresh. Disable your existing one. Then create a new one. You can reference the old one as you to it. Then once your happy just delete the old automation.

Let us know how you go.

Blacky :smiley:

@Magix3D

Something happen to your YAML and looks like you moved things. Below is a clean YAML for you. Copy and replace your YAML.

alias: Test
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.motion_sensor_hall_occupancy
    light_switch:
      entity_id:
        - light.hall_ceiling
    time_delay: 2

Blacky :smiley:

1 Like

@Shad0wWulf

Your in luck I just updated another blueprint. Looks like you are doing outdoor lights. The blueprint below can work with lux but you may want to consider sun elevation as then it will only turn ON at night. Have a look at the trigger FAQ in the below blueprint for a stairwell as it is the same for what you are doing. If you need a delay then sometimes your motion sensor has a setting for it or you can create a template sensor that has a delay OFF for you motion sensor and then use that template sensor in your night lights state trigger rather than your motion sensor.

If you need help for the template sensor then just let us know but if you using the other blueprint post the question there.

:high_brightness: Smart Light - Entity - Sun Elevation - Ambient & Time Triggers

Blacky :smiley:

@Blacky - thanks for the quick reply.

Then I think there is something wrong, either with the Blueprint or with my HA :smiley:

Your manual code works, but I tested again:

  • create automation with template
  • add motion sensor
  • add light entity

This is the YAML (unedited) it creates and it doesn’t work:

alias: Test
description: ""
action: []
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.motion_sensor_hall_occupancy
    light_switch:
      entity_id: light.hall_ceiling

@Magix3D

The blueprint is all good. I just created a basic one like yours and it worked perfectly.

For some reason you are getting this code added to your YAML.

action: []

It shold not be there. Try remove the blueprint (uninstall it, 3 dots next to the blueprint on left, then delete blueprint), restart your HA then reinstall the blueprint again and see if that cleans it up. Your code should look like this.

alias: Test
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.motion_sensor_hall_occupancy
    light_switch:
      entity_id: light.hall_ceiling

with no

action: []

Blacky :smiley:

@Blacky - very strange. Did all that and now for testing purposes I just clicked on “Create new automation” and the line you mention already exists before changing anything.

description: ""
alias: Sensor Light
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input: {}
action: []

@Magix3D

Very strange, what version of HA are you on… maybe update if your not on the latest version. This is what you should have when it first opens the blueprint.

description: ""
alias: Sensor Light
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input: {}

Blacky :smiley:

@Blacky - these are my versions, I got no updates open en.

  • Core: 2024.8.0b0
  • Supervisor: 2024.07.0
  • Operating System: 12.4
  • Frontend: 20240731.0

@Magix3D

That makes sense now. You are on the Beta version of Home Assistant. I would like to keep the 2024.8 update details for HA to announce but this is directly related to the beta and what they are doing. Please let Home Assistant know as they will bee keen to hear from you and my guess they will resolve this ASAP before the stable version comes out but you will need to let them know.

For now you know what is wrong so you can fix it and HA will resolve this for you. Please note it is not the blueprint but the beta of HA you are running.

Blacky :smiley:

is there a way to make Dynamic Lighting Sun Elevation Lighting - Colour Temp + Lux Controlled Brightness Inverted? I would love to change the colour temp in the toilet as well with the brightness based on the amount of light in the living room :slight_smile:

I am pretty sure this is very simple, but I am uncertain about the best and cleanest way to do this:
I would like to turn on certain lights only if presence is detected for a while (~1-2mins). Like working desk or dining table are not supposed to turn on every time a person passes by the area, but when sitting and it is pretty certain that a person then will stay for a while.

My idea: creating an automation with a trigger of 1-2min which then activates a helper switch and use this a the trigger entity in this sensor light automation or is there a better way?

@Maart3n

I will have to add it in. I can see the benefit and it the last option to have so I will put it on the list to do. Keep an eye out for the update.

Blacky :smiley:

1 Like

For this I would make a template binary sensor but I would have the delay only if the light is OFF and if the light is ON to have no delay. Why you ask? You would like the delay ON but once it is ON if you still had the delay it may turn your light OFF.

Blacky :smiley:

Cool, thanks! :slight_smile: I do understand why you only would want the delay for when the light is OFF, good tip!

Thanks for posting the Bypass FAQ, but could you explain how to set it up for my use case as eli5?

I have a smart plug shown as a Light entity, with Ambient light turned on.

Currently, the lights turn on with lux, however when the light switch is turned off from HA card after automation has triggered, it turns back on every time.

I’d like the blueprint to respect the override by the user, and still operate as normal.

Thanks

Something has changed a lot and not for the better in the last 7 version in terms of the bypass system.
I use it as a temporary light control system:
I go into the hallway and turn on the lamp
I go further and enter the bedroom, the light in the bedroom turns on and the lamp turns off.
It used to be exactly like that, but now when the light in the bedroom goes out, the lamp turns on again. I turn on the light in the bedroom - the lamp turns off, I turn off the bedroom turns on and so on in a circle. There was no such behavior before. Has something changed a lot or is there something I don’t understand?
Thank you for the answer.

@iona

You probably finding when you turn your light OFF the LUX value drops and then it turns it back ON. Take note of your settings.

You can do a few things but I recon that is the LUX value when you turn the light OFF.

The best way is to use the bypass option 2 and maybe a time delay. The entity for the bypass cant be your light / smart plug.

If you are just tying to turn the light ON with ambient light LUX value then try using this blueprint :high_brightness: Smart Light - Entity - Sun Elevation - Ambient & Time Triggers

Blacky :smiley: