šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

@danielcherubini

Then you can use the toggle helper and leave it ON 24/7. The sun elevation condition in the BP is what will actually turn it ON and OFF not the toggle helper.

That is what is used in the blueprint and why I did it that way. It uses sun elevation.

Have I missed something? I think this is what you are asking.

Do you think there could be a bugā€¦ I have tested this many times so it should work. I am running a test now. Stay turned.

Blacky :smiley:

@danielcherubini

I just ran a live test and it worked perfectly and instantly as soon as the sun elevation changed, no delay. Lights turned OFF. I know the light turn ON because I use that everyday so I donā€™t need to test that.

Blacky :smiley:

Ahh great, iā€™ll just leave it on 24/7 then :smiley: thats what i was hoping for.

@danielcherubini

Yep, because your worst case is sunset 1pm to sunrise 11am that only leaves 2 hours so just have it ON 24/7. Then use the sun elevation condition in the blueprint to turn the light ON and OFF.

You could also just use this blueprint :gear: Turn Light, Switch or Scene On & Off with Trigger Conditions and just use the sun condition.

Blacky :smiley:

Thanks, however it seems that the sun elevation condition looks like a binary ON/OFF, iā€™d like a transition.

edit: I think i need to use BOTH the optional sun elevation AND what iā€™ve been using which is the dynamic settings.

One last thing, could you give the optional sun elevation settings a bit more of a range?

say, 15 to -15

Transition is used. Set it in the light control.

You can use toggle helper as the trigger 24/7, with dynamic lighting and the sun elevation. They will all work together.

Just type the number you would like and click save.

Blacky :smiley:

Hey Blacky,

thanks for your fast response and suggested solution.
I previously implemented the bypass option 2 as proposed. However, I encountered the following issue: When I deactivated the night-mode entity in the morning (which was set as a bypass), the lights reverted back to the brightness level selected before the night-mode entity has been activated the evening before, even if absence was detected in the zone. As a result, the light remained on indefinitely, as long as someone entered the zone again, starting the trigger of the blueprint. Is there any alternative solution?

Lukas

@Somedia

Lets start again.

Okay that all good and working.

Try not doing it this way. Try to just use the bypass option 2 rather than using night lights and setting the brightness to 0%. Your night-mode entityā€¦ what is this? If it is something you turn ON then use it in the bypass. I use do not disturb on my phone. Some people I talked to have a toggle helper and they call in something like ā€œSleep Modeā€. or you can have a button near your bed that you push.

This could be because you are using scenes. I have toggle helpers for scenes now. The input is just under were you select your lights in normal lights and night lights. You need 2 toggle helpers, one for normal lights and one for night lights. This is because a scene has no state and the automation has no idea if it is ON or OFF. The toggle helper resolves this.


What I would do is probably something like thisā€¦ but I could be totally off the mark of what you are trying to do, so please forgive me if I get it wrong.

  1. No scene at all, have it trigger normal lights 100% brightness (or whatever you like).
  2. When you trigger the bed area, use this as a state condition for night lights and set the brightness to 20% (??). Make sure you also select ā€œIf lights are ON, adjust the lights when crossing overā€ in night light control.
  3. Some type of entity used for sleep mode, whatever you like and put it into bypass option 2. Turn it ON when you go to bed, turn it OFF when you wake up. Some people use bed sensors, I use do not disturb on my phone, some people use a toggle helper what every you like.

I think this will do what you would like.

Blacky :smiley:

1 Like

Just a suggestion, add option for sunset and sunrise, with time settings. For example switch on light at sunset - 1h, an hour earlier that sunset, you get the idea. Would be more useful than elevation in my opinion, and easier to customise the timings!

The FAQ has an explanation on why sun elevation is the recommended approach here. Itā€™s easy to use and works pretty well!

@petrutms

Thanks for your suggestion, as @Nuwanda said you will find the link to the sun condition. I have also just updated it to reflect all the questions I have had in the last few post. You will find why I did it like this by clicking here.

A good example of why I used it is in this post recently click here

Blacky :smiley:

@Blacky Hi, not sure when this started happening, but when I turn on my main kitchen lights during the day, my cabinet and floor lights come on. I donā€™t want this to happen, this should happen only after sunset.

alias: Kitchen Motion Light
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.kitchen_motion_sensor_occupancy
    include_sun: sun_enabled
    time_delay: 1.5
    end_scenes:
      - scene.kitchen_motion_light_off
    include_night_lights: night_lights_disabled
    light_switch:
      entity_id: scene.kitchen_motion_light_on
    sun_elevation: 0
    light_transition_on: 0.5
    motion_bypass_lights_off: []
    motion_bypass_lights_on:
      - light.kitchen_lights
    include_bypass:
      - bypass_enabled_turn_on

any ideas why, or is this bug ?

@andyblac

When you turn ON your light.kitchen_lights it will turn on your scene.kitchen_motion_light_on to. What is in the scene and what are you trying to do?

Blacky :smiley:

Hey Blacky,

thanks for all your help, I really appreciate it!
I thought thereā€™s no way around scenes if I donā€™t want to turn the lights off when the trigger is off. But using the night light option instead is an awesome idea. Iā€™ll give it a try the next weeks. Thanks!

Have a great day.

Lukas

why does it turn on the scene ?. what I expect the bypass to do is NOT to activate the automation IF the lights are ON.

the scene is the for motion sensor to turn on cabinets and floor lights IF the main light are NOT on. and IF I turn on the main lights DO NOT activate the motion automation.

Hope that makes sense, I have 2nd automation to turn on the cabinet and floor lights, once sun set has arrived WHEN the main lights turn ON.

@andyblac

What you have is your light.kitchen_lights in bypass 1 - Enable the Bypass - Turn lights ON. When you turn your light ON it will trigger your scene scene.kitchen_motion_light_on. The name of that scene indicates to me that it will turn ON. This is what you are asking of the automation.

If you would like it to turn OFF your scene then try and put your light.kitchen_lights in bypass 2 - Enable the Bypass - Turn lights OFF.

Check this as it looks like you may have conflicts.

Blacky :smiley:

Apologies if this has been answered before. I have tried to search and read the docs, but I cannot find an answer to my question. I have scene operated livingroom lights, and that works well, with a physical bypass switch. But is a user clicks the scene in the HA dashboard, I also want the bypass to activate. If we enable ā€œmovie-nightā€ scene, it is very irritating to get ā€œnormalā€ activated mid-movie.

How do I orchestrate this? Any suggestions (other than physically using the light-switch!)?

let me clarify what I am after. Iā€™ll start with just motion light what Iā€™m after.

when I walk into the Kitchen (when the main kitchen lights are OFF). after sunset I want the scene scene.kitchen_motion_light_on to turn on, and continue to stay on if there is motion.

Now IF I turn ON the main Kitchen Light.

If I walk into the Kitchen, and turn on the Main Kitchen Lights, I want a bypass to disable the scene to turn ON scene.kitchen_motion_light_off, as If I am cooking at the hob, as there is limited movement the 1.5 timeout is not enough and can turn off the Cabinet and floor LEDā€™s.

so what I was doing is to have a separate automation the turn ON scene.kitchen_motion_light_on when the main lights tured turned ON (ONLY after sunset), and turn on scene scene.kitchen_motion_light_off when the main lights are turned OFF.

EDIT:

after testing I have the folllwing,

    include_bypass:
      - bypass_enabled_turn_on

turns on the scene scene.kitchen_motion_light_on when main lights turn on (removes the need for 2nd automation, which is good)

and

    include_bypass:
      - bypass_enabled_stop

stops the scene scene.kitchen_motion_light_off from being tuned on, if NO motion. this is what I want it to do.

What I am after is to allow BOTH options to be allowed. ATM IF I enable BOTH options, it only recognises the last option bypass_enabled_stop

ie.

    include_bypass:
      - bypass_enabled_turn_on
      - bypass_enabled_stop
  1. turn of the scene when main lights are turned on, if after sunset,
  2. also allow the stop to be actioned if the main lights are ON.

Hope this makes more sense.

@corvy

Have you looked at this blueprint? :infinity: Sensor Light Add On - Media & Movie Lights - House Alarm Lights - Smoke Alarm Lights & Exhaust Fans + More

Blacky :smiley: