Hello Blacky,
Iâve updated the Blueprints and switch to use new Smart Light. I used the template, and the date/time is correct for my location. Iâve see how it goes for the next couple days.
One additional question can you mix Time ON/OFF with Sun Elevation. Example,
Hey guys, I noticed that when I set a Night Glow light that is not included in Night Light or Lights, the bypass option that turns off all lights does not turn of the Night Glow light.
I tried to use a scene to force to turn off the light and Iâve added it to to the âScenes - Scripts To Turn Offâ field but the problem now occurs when turning off the bypass entity. The automation does not turn on again the Night Glow light (Night Light entity helper was on when I run this test).
I donât know if Iâm doing something wrong or if that behavior is expected or is a known issue.
As a workaround Iâve added the light to the Night Light entities but the idea is to turn on that light only when Night Glow is on, otherwise should be off.
If you find a better solution, Iâd appreciate your help.
I hope this is an easy one âŚ
I would like the automation to run only if someone is at home, otherwise switching lights on donât make much sense.
I have a sensor that indicates whether a person is at home (not speaking about the cat ): binary_sensor.someone_at_home
I would like to use that sensor to decide whether the sensor light automations are active.
as soon as there is no one at home anymore, the already started automations should finish (mainly switching off lights after the configured delay).
and then the automations should âsleepâ until someone is at home again. Basically I would like to stop the automation to run triggered by the cat
I think I should use âBypass Switch - Keep The Lights Current Stateâ - am I right?
Or do I need to group the binary_sensor.someone_at_home with the motion sensor used in the automation?
Hallo Blacky,
Zwischen Sonnenuntergang und -Aufgang soll der Bewegungsmelder das Aussenlicht fĂźr ein paar Minuten einschalten. geht!
Zwischen Sonnenuntergang und 21 Uhr und 7 Uhr und Sonnenaufgang soll Dauerlicht sein. geht leider nicht.
Was mĂźsste ich einstellen? Vielen Dank
Sorry now in English
Hello Blacky,
Between sunset and sunrise the motion detector should switch on the outside light for a few minutes. It works!
Between sunset and 9 p.m. and 7 a.m. and sunrise the light should be continuous. Unfortunately it doesnât work.
What should I set? Many thanks
Vorhand
If you want to use your sensor, it must be in the ON state when no one is home. If itâs not, youâll need to invert it. Then, use it in Bypass Option 2 to ensure your lights turn OFF. In the Bypass - Time Delay, set a delay so that when your sensor triggers the bypass to turn OFF the lights, it waits for the specified time before doing so.
The best way to do this is to create a Template Binary Sensor for your continuous condition and then group it with your motion sensor.
In the trigger section of the blueprint, youâll find a link explaining how to group your motion sensor and the template sensor. Once youâve grouped them, use only the group as the trigger.
Creating a Template Binary Sensor:
Navigate to Settings > Devices & Services > Helpers.
Click Create helper.
Select Template â Template a binary sensor.
Next:
Name the sensor.
Choose a Device class (optional).
(Optional) Link the sensor to an existing device for better organization.
State Template Code:
Paste the following into the State template field:
{{ (state_attr('sun.sun', 'elevation') < -1.5 and now().hour < 21)
or (now().hour >= 7 and state_attr('sun.sun', 'elevation') < -4.0) }}
Note: The -1.5 and -4.0 sun elevation values determine when the sensor is active. Adjust them to fit your needs.
Blacky
In German for you.
"FĂźr mich ist beides in Ordnung.
Der beste Weg, dies zu tun, ist das Erstellen eines Template-Binärsensors fĂźr deine dauerhafte Bedingung und anschlieĂend das Gruppieren mit deinem Bewegungssensor.
Im Trigger-Abschnitt des Blueprints findest du einen Link, der erklärt, wie du deinen Bewegungssensor und den Template-Sensor gruppierst. Sobald sie gruppiert sind, verwende nur die Gruppe als Trigger.
Erstellen eines Template-Binärsensors:
Navigiere zu Einstellungen > Geräte & Dienste > Helfer.
Klicke auf Helfer erstellen.
Wähle Template â Template-Binärsensor.
Als Nächstes:
Benenne den Sensor.
Wähle eine Geräteklasse (optional).
(Optional) VerknĂźpfe den Sensor mit einem vorhandenen Gerät fĂźr eine bessere Ăbersicht.
State-Template-Code:
FĂźge den folgenden Code in das State-Template-Feld ein:
{{ (state_attr('sun.sun', 'elevation') < -1.5 and now().hour < 21)
or (now().hour >= 7 and state_attr('sun.sun', 'elevation') < -4.0) }}
Hinweis: Die Werte -1.5 und -4.0 fĂźr die Sonnenelevation bestimmen, wann der Sensor aktiv ist. Passe sie nach deinen BedĂźrfnissen an.
I am running Ikea bulbs with this automation (like many others I suppose) but also have the issue that quite often some lights wonât turn off after the automation. Not sure why that is happening, but I found out that this might be a rather common issue with the ikea bulbs. Hopefully we can somehow integrate a fix for all those of us running ikea lights or help us with the current workarounds:
The currently best workaround is either to create template sensors and helpers for every light and create an additional automation that turns off these lights according to the state of these helpers. The other method described is to send the turn off signal twice.
As the latter option is much less work and maintanance, it would be great to have an option to add a custom action that triggers together with turning on and off a light. The you could just run the turn off signal as a custom action again.
As you then could also run other stuff together with the lights without a lot of fuss, I imagine this would be a neat feature for other people as well. Any chance of making this happen?
@Blacky Iâm having a problem with my bathroom toilet light using the night lights. For some reason the toilet light dimming level is not being set to 10. Itâs stuck full blast at 100% per the HA dashboard. Any ideas why the brightness is not being properly set? Itâs a Inovelli White series thread/matter dimmer.
There are a few things to check, but you should find the answer somewhere in your settings:
Snapshot Behavior: A snapshot is created before running the add-on. This means the current state is included in the snapshot. Is the light OFF at this time?
Scene Inclusion: In the sensor light, you have a scene called home. Is the light included in that scene?
Night Glow Behavior: In the sensor light blueprint, you have night lights with glow lights. Are the glow lights turning ON while LED Scrivania is not? Is this happening between 12 AM and 8 AM when night lights are active?
Hopefully, this helps you track it down. Itâs likely happening because something in your settings is triggering it.
Iâm also releasing an update for the sensor light blueprint, which includes several bypass bug fixes. I have done all the code changes for the update. Now, I just need to do a final check to ensure everything is correct before releasing it. This update might resolve the issue, so if you canât find the cause now, you may want to wait for the update to see if it fixes it.
Adding a custom action sounds simple, but getting the logic right can be tricky. One approach you could try is using the Scenes & Scripts - Toggle Helper. Then, create another automation that turns the IKEA bulbs OFF when this helper changes from ON to OFF. This could serve as a secondary signal to turn them OFF reliably.
However, the issue seems to be with the IKEA bulbs themselves. Iâd recommend reaching out to IKEA and explaining that youâre using Home Assistant to control the lights, along with a description of the issue. Hopefully, they can help resolve the communication error.
Came here to say thanks for this blueprint - it works very nicely, and this comment answered the question that I was wondering about - being able to start the automation at sunset, and then stop it at midnight. Used this template with just the evening part, and it works lovely! Thanks!
Your lighting experience, your way â take control and customize it to perfection!
Bug Fixes
Bypass
Turn OFF action: When using Night Glow, the bypass would not turn off the Glow lights when using option 2.
Crossover when bypass is ON: Addressed multiple scenarios where, if the bypass was turned ON and a crossover occurred, the correct action would now be performed when all bypasses were turned OFF.
Global Conditions
Fixed an issue where Night Glow lights would not turn OFF based on sun, ambient, or time conditions.
Maintenance
Some code clean up in Device Tracker.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here