šŸ”† Smart Light - Entity - Sun Elevation - Ambient & Time Triggers

Hi Blacky! Once again - thank you for all your work on the blueprints. As you can tell Iā€™m working my way through all of them and replacing my multiple convoluted automations with your simple and structured blueprints :sweat_smile:

Iā€™m considering replacing my 3 automations with what I think can be done with this single blueprint, which does the following:

  1. At sunset, turn ON 4-specific lights, if there is anyone at home
  2. At sunset, if no one is at home, turn ON only 2-specific lights (for the dogs :slight_smile:)
  3. If we leave the house after sunset, turn OFF all lights leaving just 2-specific lights ON
  4. When returning home after sunset, turn ON 4-specific lights (similar to case 1)

Scenarios 1 & 2 seem like they can be done fairly straightforward through the sun elevation trigger and appropriate global condition of zone.home.
Scenarios 3 & 4 - am I right in assuming I have to use the entity state option (I have a ā€œpersonsAtHomeā€ group which reports ā€œhomeā€ and ā€œnot_homeā€ I can tie to a ON/OFF toggle helper) to trigger these? Am I on the right track here? Hopefully this isnā€™t too confusing!

@Nuwanda

Best to use the sensor light blueprint with probably a schedule for the trigger and sun condition and device tracker. The 2 lights to leave ON without device tracker.

TIP If you use a schedule helper then you can set the time before sunset and OFF later in the night or after sunrise. Then when you select the sun condition it will trigger the light ON / OFF if someone is home. Device tracker will turn the lights ON / OFF when you arrive or leave home if the trigger is ON and it meets your sun condition.

Blacky :smiley:

Oh wow! This is much simpler than I was even expecting. Will play around with setting it up and report back. Thank you!! :smiley:

I guess this is best asked in the other blueprint discussion, but just for continuity -

After a bit of playing around, the 2 lights ON without device tracker and scheduled trigger works perfectly.

The other 4 however partially works. When people at home during sunset it works fine. When everyone is away and someone enters home zone after sunset, it doesnā€™t trigger. Iā€™ve set up the automation as follows: scheduled trigger (well before sunset and just before sunrise), sun elevation enabled, device tracker enabled (tested both zone and zone+people). Am I missing something? Another trigger perhaps?

FAQ - How do I use the triggers?

Iā€™ll provide two examples: one for stairwell lighting and another for family room lamps. These examples will illustrate how you can use the new blueprint to create customized lighting solutions for different areas of your home.

Stairwell Lighting

Imagine your stairwell lights automatically glowing as the sun sets, and smoothly transitioning to OFF when the sun rises. Hereā€™s how it works:

  • ON: The lights turn on at sunset with a soft 10% brightness.
  • Motion Detection: When motion is detected, the brightness ramps up to 50%, brightening your path.
  • Motion Cleared: Once motion is cleared, the brightness dims back down to a gentle 10% glow.
  • OFF: The lights automatically turn off when the sun rises.

This setup ensures your stairwell is always appropriately lit while saving energy when not in use!

Below is how you set it up:

  1. First, we set up our sun triggers for both ON and OFF.

  2. Add your lights into the Lights - Switches - Scenes - Scripts section.

  3. Set your light control options to use brightness and transition. If desired, you can also adjust the colour settings here.

  4. Next, weā€™ll enable night lights and use the state option. Then, select your motion sensor for the Night Lights - Entity State.

  5. The add your lights into the Night Lights section.

  6. Finally set your light control options to use brightness, transition and If lights are ON, adjust the lights when crossing over. If desired, you can also adjust the colour settings here.

  7. Make sure to test everything to ensure itā€™s working correctly, then sit back, relax, and let the automation handle your stairwell lighting :tada:

Family Room Lamps

For a cozy family room ambiance:

  • ON: The lamps light up as soon as the sun sets.
  • OFF: They automatically turn off at 11 PM, ensuring you never have to worry about forgetting to switch them off.

Enjoy the perfect blend of comfort and convenience with your family room lamps effortlessly adapting to your daily routine!

Below is how you set it up:

  1. First, we set up our sun trigger for ON only.

  2. Then, we set up the time trigger for OFF only.

  3. Finally add your lights into the Lights - Switches - Scenes - Scripts section.

  4. That night, make sure to test everything to ensure itā€™s working correctly. Then, sit back, relax, and let the automation handle your family room lighting! :tada:

Enjoy

Blacky :grinning:

Back to FAQ: Click Here

New update 2.1

:boom: :tada: HUGE BLUEPRINT UPDATE! :tada: :boom:

Get ready for a game-changing update! :rocket: Weā€™ve rebranded and revamped everything, so much so that the old blueprint has officially retired. Introducing the all-new :high_brightness: Smart Light blueprint! :partying_face:

This is not just an upgrade; itā€™s a complete transformation. Weā€™ve taken all the fantastic features from our sensor light blueprint and supercharged them with even more exciting trigger options. Imagine having the flexibility to mix and match triggers to perfectly suit your needs!

For example, you can set your lights to turn ON based on the sunā€™s elevation and OFF based on time. The possibilities are endless, and the control is all yours! :heart_eyes:

Dive in and discover how this new blueprint can be tailored to your unique lighting needs. You wonā€™t want to miss out on this incredible upgrade!

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

3 Likes

Great update Blacky! Quick question - my use case is for our outdoor lights. Turn on at sunset and then off at a specific time depending on the day (weekday or weekend). However I do want to use a device tracker condition so that these lights donā€™t turn on when no oneā€™s home. I guess in this case its best to stick to the Sensor blueprint with the schedule trigger? Or is there a way I can use a device tracker group helper as the entity here? Thanks!

PS. thereā€™s a typo in trigger-time section (NO time instead of ON time).

@Nuwanda

This blueprint is very different to the sensor light blueprint. I think if the sensor light blueprint is working well then maybe leave it alone but if you got an itch and would like to test it using the same bypass we talked about in the sensor light blueprint then try it out and let us know how you go. The conditions for this was a bit tricky and it may just work. I havenā€™t tested that scenario but it would be nice to know.

Thanks for letting us know I realty appreciate it, my bad :pensive: It has been fixed if you push the update PB again :+1:

Blacky :smiley:

Hey there, so I just got this blueprint installed, and Iā€™m having a little confusion. Weā€™re trying to use this to control lights for tropical plants and want to keep it on a dawn/dusk cycle (or sunrise/sunset, but from my understanding it seems thatā€™s not recommended for whatever reason).

If Iā€™m following the coding for the sun elevation script itā€™s actually being used to turn the lights -on- at night and off in the day (which makes sense from an outside night light scenario) Am I reading this right or am I off base?

If Iā€™m reading right, what would be the best way to address this so it triggers in the opposite direction?

Here is my current YAML to help with troubleshooting:

description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_sun:
      - sun_falling
      - sun_rising
    light_switch:
      entity_id:
        - switch.tpl_br_wall_smart_plug_1
        - switch.grow_light_switch
        - switch.wall_grow_light_switch
        - switch.grow_tent_main_light_switch
        - switch.tuya_nu_wall_light_switch
        - switch.living_room_grow_light_switch
        - switch.br_ceiling_lamp_switch

At the moment I worked around it by making a input toggle to match the sun state and used the entity setting as a workaround, but I suspect this can work as desired

@raindropworks

Welcome to the community.

The sun trigger only turns the light ON at sunset and OFF at sunrise. The way you did it is a good workaround if you would like it to turn ON at sunrise and OFF at sunset.

Blacky :smiley:

1 Like

Okay, so I did understand how it was designed. Any idea if that will change in the future to give the option or something?

first of all and as always: @Blacky thanks a million for your blueprints!

and secondly a question (of course :wink: )

my requirements:
my outdoor balcony lights should turn on when the ambient brightness in the living room is below 10 lux and turn of when itā€™s getting brighter again (above 15 lux). This should only happen between 6:30 in the morning and 22:30 in the evening (letā€™s call it daytime)

How to achieve this?
I think the Trigger-Time is only appropriate to switch the lights off at 22:30. But it could not enable the automation at 6:30. Am I right here to state that this wouldnā€™t work

I am considering using Night-Time and setting the brightness to 0. which would mean I need to set the brightness at daytime to e.g. 100%.
That would work as long no one changes the brightness during daytime to eā€¦g 50%, then the ambient settings turn the lights off and on again, in this case brightness would be set again to 100%, but not to 50% as they were before.

How could I implement my requirements? Is there anything I could do within the blueprint based automation?
or do I need a scheduler that switches off the lights at the start of nighttime (22:30) and deactivates the automation, and another scheduler to activate the automation at the start of daytime (6:30)?

@raindropworks

Well I do have dynamic lighting that works of the sun elevation during the day so it make sense to also include this as a trigger option. Yea I will put it on the list to add in.

Blacky :smiley:

1 Like

@nicknol

Again thanks for you kind words.

Even though this PB looks like the sensor light PB it is very different. This one works of your chosen triggerā€¦ example I use it to turn on my family room, kitchen lamps when the sun sets and then turn OFF at 11:00pm. Time is not a condition in this PB but a trigger and the only condition is weekday.

The best way to achieve what you are truing to do is use the sensor light BP (not this one). In your trigger use a schedule or time of day helper for 6:30 to 22:30. Then set up the ambient to your liking. That BP will turn ON and OFF everything perfectly for you.

Blacky :smiley:

Awesome! I was at my sisterā€™s tonight where I first used your script and when it hit dusk I kind of freaked as all the plant lights turned off, then was like ā€˜oh yeah, I guess that means the patch is working as intendedā€™

1 Like

Thanks a lot @Blacky
I will try the sensor light BP very soon and let you know the result
Cheers,
Nick

1 Like

Is it possible to make the Blueprint switch on the lights only in summer?

@lamekudz

Currently not a selection option.You could use the bypass to turn your lights OFF for winter, just need to create a template sensor for itā€¦ Can I ask why? what is it for?

Blacky :smiley:

I have a switch that keeps on every night, but I only need that in the summer. (and tbh if thereā€™s a way to automate it it would be amazing.- if not itā€™s not that big of a problem)

1 Like

New update 2.2

Smart Lighting: Your Lights, Your Way - Take Control and Customize it to Perfection! :bulb: :sparkles:

:new: New Feature

  • Dynamic Lighting - Added new option, 9 - Sun Elevation Lighting - Colour Temp + Lux Controlled Brightness Inverted. I think I got them all now :partying_face:

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning: