Use the BP for the hall. Then set up you night lights with your time hours. Include the light in the hall and the light in the bathroom in night lights.
Hope this helps you.
Blacky
Use the BP for the hall. Then set up you night lights with your time hours. Include the light in the hall and the light in the bathroom in night lights.
Hope this helps you.
Blacky
Hi Harry, hope all is going well.
I am just trying to get my head around what you are doing. Not sure if you are using time for night lights (9pm) for your softer lights and then a toggle helper in the bypass to turn the light ON in bypass option 1. Then your question is to also include a LUX reading to turn the light ON using the bypass option 1.
Maybe provide your YAML of the automation and confirm what you would like the LUX sensor to do. Example
Blacky
Hi Blacky
First time using dynamic lighting since I now have a few lux sensors. So forgive my slow start. Here is the YAML:
alias: Master Bedroom Lights on by Motion
description: Master Bedroom Lights on by Motion if Night Mode Off
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.master_bedroom_presence_and_motion_sensors
light_switch:
entity_id: light.master_bedroom_bedside_lamp_group
include_light_control:
- use_brightness
- use_colour_temperature
include_bypass:
- bypass_enabled_turn_off
motion_bypass_lights_off:
- input_boolean.day_night_mode
time_delay: 4
include_night_lights: night_lights_enabled
night_lights:
entity_id: light.master_bedroom_bedside_lamp_group
include_night_light_control:
- use_brightness
- use_colour_temperature
night_lights_after_time: "22:00:00"
night_lights_before_time: "08:30:00"
night_lights_conditions:
- time_enabled
night_time_delay: 5
night_light_brightness: 10
include_dynamic_lighting: enable_lux_controled_brightness
dynamic_lighting_lux_sensor: sensor.light_sensor_ls2_master_bedroom_ambient_light
dynamic_lighting_max_lux: 45
dynamic_lighting_min_lux: 35
dynamic_lighting_max_brightness: 60
light_colour_temperature: 3500
light_brightness: 80
night_light_colour_temperature: 3500
dynamic_lighting_max_colour_temp: 3500
dynamic_lighting_min_colour_temp: 3500
dynamic_lighting_heartbeat: 1
Iâm trying to have the light intensity at 0 (off) when the light is at 45lx or above, and when it hits 25lx, start progressively heading up to 60% brightness. The heartbeat is set to1 just to make testing easier.
Question. How does night light affect all this (ignore for the moment that the binary sensor is a bypass and it wonât come on). Does using dynamic lighting replace the need for night light?
Also is this description incorrect?
Used in options 1, 2 or 7 - With every heartbeat, the system evaluates the lux value, light brightness, and the targeted brightness. If the targeted brightness surpasses the predefined step value, the system applies the set step value to gracefully moderate the rate of changes, facilitating a smoother transition in light brightness.
Should it not be
âif the targeted brightness surpasses the actual targeted value by the amount of the predeefined step valueâŠâ
Hi Harry
Okay so from 45lux to 25lux what brightness would you like. And then from 25lux to ?? to start heading up to 60%.
Night lights donât have dynamic lighting. It is only for normal lights.
Yes
No
I will explain as best as I can.
When dynamic lighting turns ON it can jump to a high brightness %. Lets say when dynamic lighting turns ON because it is dark the brightness target is 90%. Then when the light turns ON this effects the lux sensor and the next target is 20%. If it then goes to 20% the next target may be 97% then the next target it 24%, you get the idea⊠the light jumps around and this is not pleasant to the eye.
Now lets look at "Step Valueâ. Again when the light turns ON the target brightness is 90%. Then when the light turns ON this effects the lux sensor and the next target is 20%. That is 60% target value and the step value is 4%, so the light next step value will be 86%. Then it checks again and the target value is 30% that is 56% so the next step will be 82%, you get the idea⊠this is more pleasant to the eye and slowly gets to a set value. The dead zone stops the final small adjustments so these micro adjustments donât play on your eyes and keeps it a comfortable space to live in.
Knowing this you have to have a correct heart beat to your lux sensor reporting value. If you speed up the heart beat and the lux sensor is slow to react then you will not get the correct design / experience of this feature. This is critical. Example say your lux sensor updates every 30 sec then setting a heart beat of 1 sec is not good because the heart beat would like to see the change in the lux sensor and preform a new calculation based on its last adjustment. If your lux sensor updates every 30 sec then it is best to set a heart beat at 30 sec + like 45 sec. This is for testing. Once you see it work having a longer heart beat is better but not too long so it doesnât work. It is a bit of a balancing act and ever setup is different and every site is different all depending on how it is used. The good news is⊠you have full control in your hands to make it perfect as you would like it.
Dynamic lighting is best used when the sun is out during the day and going to sunset. It can also be a nice way to wake up with a sunrise affect. Also google âcircadian rhythmsâ. It is a really nice feature. From 25lux to ?? is a small window to have though but it can be a lot of fun testing it out.
Anyway if you can get back to me on this question. âOkay so from 45lux to 25lux what brightness would you like. And then from 25lux to ?? to start heading up to 60%.â I will set it all up for you and provide your YAML.
Blacky
What Iâm trying to do is make the lights stay off (brightness 0) on motion during the day when itâs bright. Then when it starts to get dark as the sun sets, maybe 50lux, start turning on when triggered perhaps at 100% brightness. The brightness would drop down to 10 percent on triggering as it gets down to 0 lux. The numbers are arbitrary, need to test for lux vs light brightness, but thatâs the concept.
I like to walk up to the bedroom after reading or TV, letâs say 10pm, and outside of course itâs dark, but have the lights come up to just 10 percent. Ten percent would be the lowest. Donât need bright lights to get ready for bed.
Of course when I trigger the bypass (hey google, good night triggers binary helper) that would prevent lights from going on.
In the morning when waking up, it would reverse itself, coming on dim and then eventually NOT turning on the lights when it hits 50 lux.
Hope this makes sense.
Looks like sun elevation would work better for you and then use your lux sensor in the global conditions. We use dynamic light option 4. When the sun elevation is 5 deg and lux is below 50 the light will turn ON at 100%. At night sun elevation is -4 the lights will be 10%. In the morning at sun elevation -1.5 lights will be at 10%. Night lights is sun elevation from -4 to -1.5 and the lights will be 10%. Before any lights can turn ON the lux must be below 50lux so they will be OFF during the day.
Have a look at this one. Copy paste it into you YAML.
alias: Master Bedroom Lights on by Motion
description: Master Bedroom Lights on by Motion if Night Mode Off
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.master_bedroom_presence_and_motion_sensors
light_switch:
entity_id: light.master_bedroom_bedside_lamp_group
include_light_control:
- use_colour_temperature
include_bypass:
- bypass_enabled_turn_off
motion_bypass_lights_off:
- input_boolean.day_night_mode
time_delay: 4
include_night_lights: night_lights_enabled
night_lights:
entity_id: light.master_bedroom_bedside_lamp_group
include_night_light_control:
- use_brightness
- use_colour_temperature
night_lights_after_time: "22:00:00"
night_lights_before_time: "08:30:00"
night_lights_conditions:
- sun_enabled
night_time_delay: 5
night_light_brightness: 10
include_dynamic_lighting: enable_sun_elevation_brightness
dynamic_lighting_max_lux: 50
dynamic_lighting_min_lux: 0
dynamic_lighting_max_brightness: 100
light_colour_temperature: 3500
night_light_colour_temperature: 3500
dynamic_lighting_max_colour_temp: 3500
dynamic_lighting_min_colour_temp: 3500
dynamic_lighting_heartbeat: 1
dynamic_lighting_min_brightness: 10
include_ambient: ambient_enabled
ambient_light_sensor: sensor.light_sensor_ls2_master_bedroom_ambient_light
ambient_light_value: 50
dynamic_lighting_sun_elevation_end_rising: 5
dynamic_lighting_sun_elevation_start_falling: 5
night_lights_sun_elevation: -4
night_lights_sun_elevation_rising: -1.5
ambient_light_options: ambient_light_option_enabled
Blacky
That looks like what Iâm looking for. Thanks.
Lights fail to get back on, if Off-Dim has startet and the trigger is flipped to ON while itâs happening?!?
Iâm running the latest 6.5 version of the BP, and I was puzzled about, why the lights would not go back on, sometimes when I re-enter the area.
Itâs seems that, my LIFX downlights does - often - not accept a âfade upâ or âflip onâ command, if they are engaged in a current âfade downâ event.
Has anyone else seen this, and if so, with other brands of bulbs as well?
Could it be, that the bulbs is simply missing the command? I was just trying to test it, and it seems a bit random, sometimes 2/3 bulbs do re-light up. I canât find a pattern, other than they seems to ignore the latest command if they are âbusyâ.
Funny thing is, triggering other scenes from other sources (like buttons), seems to work just fineâŠ
Any ides?
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
Sure, here it is:
alias: Lys Gang BP
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.epl_gang_occupancy
light_switch:
entity_id: light.gang_ovenlys
time_delay: 0
end_scenes:
- scene.gang_off
dynamic_lighting_lux_sensor: sensor.epl_gang_illuminance
include_night_lights: night_lights_enabled
night_lights:
entity_id: light.gang_ovenlys
night_time_delay: 2
night_lights_after_time: "22:00:00"
night_lights_before_time: "08:00:00"
night_lights_conditions:
- time_enabled
include_light_control:
- use_brightness
- use_colour_temperature
- use_transition
light_colour_temperature: 2600
light_transition_on: 1
light_transition_off: 10
night_light_brightness: 10
night_light_colour_temperature: 2300
night_light_transition_off: 10
include_night_light_control:
- use_transition
- use_brightness
- use_colour_temperature
- if_lights_are_on_adjust_when_crossing_over
ambient_light_sensor: sensor.epl_gang_illuminance
ambient_light_options: ambient_light_option_enabled
Thanks for your YAML.
I have noticed you have a scene âscene.gang_offâ in âScenes - Scripts To Turn OFFâ. Not sure why this is there because you are using a light entity in âLights - Switches - Scenes - Scriptsâ. Could you please remove your scene âscene.gang_offâ in âScenes - Scripts To Turn OFFâ and see if that helps you. All the rest looks okay.
Let us know how you go.
Blacky
Hey!
Firstly thank you for doing this! Itâs been perfect. I am however suffering a small issue. I can get the lights to turn on when the lux is below the value, but when it detects the lux being above 80, the lights do not switch off automatically like they did. Not 100% sure what I have done wrong. I can see the trace saying itâs gone above 80 but I am a bit of a noob so not sure whats stopping it switching them off.
latform: numeric_state
id: t10
entity_id: sensor.lightsensor_illuminance
above: 80
alias: Automated light - Lux
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- schedule.lights
end_scenes:
- scene.night_night
ambient_light_sensor: sensor.lightsensor_illuminance
ambient_light_value: 30
include_device_tracker: zone_people_enabled
zone: zone.home
people:
- person.tom
light_switch:
entity_id: scene.automatic_lights_on
dynamic_lighting_lux_sensor: sensor.lightsensor_illuminance
include_ambient: ambient_enabled
Hi Blacky,
What kind of entity state is needed to work in the Night Lights?
Can the Night Lights - Entity State be a Motion Sensor?
Hi Tom, and welcome to the community
Thanks for providing your YAML as it helps me help you
Because you are using scenes we will need to create a toggle helper and enter it into âScenes & Scripts - Toggle Helperâ. Once you do this it will work.
Creating a Toggle Helper
Go to Settings / Devices & Services / click on the âHelpersâ tab at the top / create helper and select toggle.
Input the name you would like to call it and click create.
Then just enter it into the blueprint here.
Let us know how you go.
Blacky
You normally use an entity that will be turned ON and OFF and they hold the state. A motion sensor is not really recommended. You would normally use a motion sensor in the âTrigger Sensorâ and that will work in night lights as well. Some examples for the âNight Lights - Entity Stateâ would be.
Hope this helps you
Blacky
Hello Blacky, I have a problem! I want to activate the night lights with the do not interrupt mode on my cell phone. The problem is that when I activate it, the sensor does not show âonâ but âpriority_onlyâ.
Do you have any idea how to solve it?
Thanks!
Hi all! What a fantastic blueprint. Iâm a noob but it seemed straightforward until I realized it didnât quite work last night. I have a motion sensor at the back door of my house. When it detects motion, I want it to turn on 3 devices in the rear - my landscape lighting, my rear door light, and my rear sconces. Only at night. Then to turn them off 15 minutes later if no motion is detected.
The two lights are enbrighten z-wave light switches that otherwise work fine. The landscape lighting is triggerd by one of the two plugs on a ministone outdoor smart plug.
It ran last night when it detected motion but oddly, only the landscape lighting turned on. Not the rear door light or sconces. Also it did not turn the landscape lighting off 15 minutes later. Not even an hour later. I had to turn them off manually.
Mind taking a quick look to see if anything is obviously wrong? Iâll try to test it some more tonightâŠ
Here is my YAML
alias: Rear Door Motion
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.multisensor_6_motion_detection
light_switch:
entity_id:
- light.landscaping_lights_2
device_id:
- d2785ba3695aa1f325ed6420cf4b88b5
- 10c763e2bf3dd93f6441e4a1be43b863
time_delay: 15
include_sun: sun_enabled
Hi CĂ©sar ZenĂłn DĂaz Cueva
Welcome to the community.
Yes. If it is not working when you add this to the state you can create a binary template sensor helper to create an ON / OFF state when this entity goes to âpriority_onlyâ. Here is how you would do this.
Go to Settings / Devices & Services / Helpers Tab at the top / Create Helper / Template / Binary Sensor / Enter in the name you would like to call it and in âState Templateâ paste the code below. Click Submit and then use that binary template sensor in your night lights state.
{{ is_state('sensor.pixel_7_pro_do_not_disturb_sensor', 'priority_only')}}
Blacky
Hi Gerald
Thanks for providing your YAML.
In âLights - Switches - Scenes - Scriptsâ you are using 2 devices. This is why it is not working as it only supports entities. You need to expand down the devices to entities and you will be all good. To do this please see this FAQ, click here
Blacky