Hi @Blacky. Thanks for this blueprint! FYI: Somewhere between 6.x and 7.1 the Nightlight light/scene/script entities lost the ability to be a scene entity. It only tries to turn on lights and run scripts. Cheers!
Actually, I found that if I remove the scene entity and then add it again, it starts working. It must be a wrinkle in the jump between 6.x and 7.1. This happened on every instance of this blueprint. No worries. Itās probably not worth investigating.
Thanks for your input. I is nice to get some feedback as a developer. I take your suggestion on board and if you would like to PM me with the other sections which require similar attention I look at them to. You can just put the section heading and the description you think needs to be changed rather than in code. Sometimes fresh eyes and using it for the first time can be a good thing.
Blacky
Hi Ryan
Let me know if you can manually turn your light ON at 1%ā¦ please be true full here as hours / days of work will be in the investigation of it (down a rabbit hole). It may be the Dynamic Lighting - Step Value so in your testing can you set this to 0 and see if that works.
Blacky
Interesting, the only thing that change was light colour temp and nothing to do with scenes.
Thanks for letting us know.
Blacky
Update: I set the min brightness to 8% and the lights worked as expected.
However setting the lights manually to 1% also works just not in the blueprint automation.
Very weird but happy your suggestion worked and Iām ok with the solution
Iām still slightly confused by how Bypass Auto-Off works.
My use case is a bathroom with two light fixtures: a main one and over the sink one. Both are controlled with separate switches, the main light switch is outside the bathroom. Also, thereās a motion sensor on the ceiling.
My Sensor Light template configuration is:
- Trigger: bathroom ceiling motion sensor
- Lights: Bathroom Sink Light, Time Delay 1 minute
- Bypass Switch:
- option ā3: Keep the lights current stateā
- using Bathroom Main Light switch
- 0 minutes time delay,
- Bypass Auto OFF using āKeep The Lights Current Stateā option and 1 minute delay
What I want is:
- if I donāt turn the main switch on before entering the bathroom, the over the sink light gets turned on on motion detected and switched off 1 minute after motion no longer detected. This works fine.
- If I turn the main switch before entering the bathroom, the over the sink light does not get turned on. This is thanks to bypass and it works fine.
- If I then leave the bathroom, the main (and sink, if turned on manually) remain on for 1 minute of inactivity, then get switched off.
The third use case doesnāt work. Whatās happening is if I turn the main switch before entering the bathroom, it gets switched off 1 minute later precisely, even with motion being detectedā¦ I assumed that the Bypass Auto Off also consider whether there was motion detected, but apparently thatās not the case?
If this works as intended, I would suggest adding an option to also make it consider the motion. Alternatively, I can disable the ābypass auto OFFā altogether and add a separate automation that would turn the main light off upon inactivity. This should work fine, but it would still be nice to have all the bathroom light switching logic combined in one automation.
But it is! The are two lights, the light I use the automation for is the sink light, meanwhile the bypass is configured using the main light switch.
This works fine, the only thing that doesnāt like I thought it would is the Auto Off functionality, which I thought was going to switch the bypass off a minute after no motion is detected.
Anyway, Iāll use a separate automation for the main light and be over with it.
Thank you for helping me keep out all the bugs- I was able to set up a presence controlled hallway light with a bypass to turn off the lights using door sensor - thanks @Blacky
What Iām looking for now is the opposite: an option to control the group of lights in an area based on the presence sensor the following way: reduce the brightness of the lights that are on when no one is in the area, and reset it to the previous value when someone comes back into the room
I have one more inquiry: is it possible to have the automation turn on the light on motion only at specific hours BUT have it turn the light off automatically all day long? I.e., I want the light on at night automatically upon activity but have it turn off automatically all day long.
may I ask how the dynamic light color temp is working with RGBW lights? I made a card which shows all the components, but cannot really figure it out. Is there a way you calculate Kelvin to RGBW? thanks
Is it possible to add the no motion detected time delay thatās used in the supplied HA Motion Light Blueprint as below? This resets the Time Delay (Wait) if motion is detected within the no motion countdown time period. I find without this, the lights just turn off with or without activity after the delay has expired (hope that makes sense) Maybe it already does something like this, & it isnāt working for me I tried, I failed miserably, Iām 67 and never programmed or coded in my life - so big to those that can
Sensor Light Blueprint code
time_delay:
name: Time Delay
description: The time delay determines how long the lights, switches, scenes,
and scripts will remain active after all triggers are clear, initiating
the time delay to turn them OFF.
default: 5
selector:
number:
min: 0.0
max: 30.0
step: 0.5
unit_of_measurement: minutes
mode: slider
Motion Light Blueprint code
Removed by request
Yes. There are four conditions: sun elevation, ambient, time, and device tracker.
-
Time: Set this if you want the automation to run during specific hours.
-
Sun Elevation: Use this to control the automation based on the sunās position.
-
Combination of Time and Sun: To start at sunset and turn off at a specific time, like 11 PM, set the start time before sunset (e.g., 4 PM) and the end time at 11 PM. Then, configure the sun elevation so it triggers at sunset and deactivates after 11 PM (e.g., elevation +10). Both conditions must be met for the automation to run, so it will activate at sunset if motion is detected and deactivate at 11 PM.
Blacky
Dynamic lighting controls Brightness and or Colour Temperature.
If you use Brightness then brightness in light control will be disabled.
If you use Colour Temperature then colour temperature and RGBā¦ in light control will be disabled.
Blacky
Thank you for reaching out! The information youāre looking for is already includedā¦ please see below.
If youāre encountering issues and would like me to take a look, please share the YAML code for your automation. This will display the settings youāve selected, making it easier for me to assist. Hereās how:
- Open your automation.
- Click the three dots in the top right corner.
- Select āEdit in YAML.ā
- Copy the entire code.
- Return to the forum and, in your reply, click the ā</>ā button in the toolbar.
- Paste your code inside the code block.
Could I kindly ask you to delete the code you posted earlier that pertains to another blueprint? This will help keep the discussion focused. Thank you so much for your cooperation.
Blacky
Oh, thanks, although thatās not what I needed help with. My concern was whether the automation would turn off the light after manually turning it on outside of the configured time constraints. I had it tested already, though, and it indeed does switch off, so it works exactly as I need it to.