🔆 Smart Light - Entity - Sun Elevation - Ambient & Time Triggers

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:

I have been unable to get the automation to work using time as a trigger since the latest update. I created a new automation and here is the created yaml

image

But it always gives the following error. Am I doing something wrong?

2024-08-18 11:55:00.153 ERROR (MainThread) [homeassistant.components.automation.den_ceiling_fan_automation] Error rendering variables: UndefinedError: ‘dict object’ has no attribute ‘entity_id’

@Mark17

You are using a device. entities are only supported you will need to expand them down. I will link you to a FAQ in my sensor light blueprint that shows you how to expand them down, it is all the same. Click Here

Blacky :smiley:

Thanks that worked. I missed the comment about not using devices (which is confusing as to why the selection button for devices shown at all.) I also made things complicated as I was removing all of my Wemo switches and replacing them with Kasa switches and then I upgraded your blueprint to the new version.

I have created an automation using the ‘Sun Elevation’ trigger. The lights turn on in the evening, but they never turn off in the morning. Is there anything wrong with the Yaml?

alias: Lampen woonkamer aan/uit
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_sun:
      - sun_falling
      - sun_rising
    light_switch:
      entity_id:
        - light.lamp_bankstel
        - light.lamp_tv
    sun_elevation: 2
    sun_elevation_rising: 1
1 Like

Hi Blacky, hope all is well.

turn on/off night light feature.

Start @ 21:30
end @ sunrise

is this possible?

kind regards Daniel

@Mark17

Nice one, glad you got it working.

Blacky :smiley:

@Kroevel

All you YAML looks good. I cant test it now but I will get back to you after my holiday. Thanks for being patients and for letting me know.

Blacky :smiley:

@greenembrace

It should be but @Kroevel sugested that maybe sunrise may not be working. If you can let us know how you go as I am on holidays.

Blacky :smiley:

No worries. Enjoy your vacation!

Edit: FYI - I have changed the ‘lights off’ event to turn the lights off at a fixed time until there is a solution.

1 Like

Thanks mate,
i’ll keep fiddling.

enjoy your time.

@greenembrace

Thanks Daniel, I fix it when I get back form holidays.

Blacky :smiley:

Hi,

Thank you very much for all your Blueprints. It makes complex automations so easy and cleanly presented.

I just imported the Smart Light blueprint in order to turn ON and OFF outdoor lights.

I have set up to turn lights ON on sun elevation falling and turn them OFF at 22h30.

Normally, it all works fine.

However, last night I was doing some late night tweaking in Home Assistant and restarted Home Assistant at around 00h00. To my surprise, the outdoor lights turned ON.
I see there is a trigger on Home Assistant starting in the automation debug trace. I guess the automation validates sun elevation falling condition is valid and just turns the light ON, no matter what time it is at the moment of Home Assistant restart.

Is this normal behavior?
I just want to make sure I’m not missing anything.

@psyko_chewbacca

Thanks for the info, I going to have a look at this in the next day or 2. I will also investigate this. You may see an update out soon.

Blacky :smiley:

New update 2.3

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

:bug: Bug Fixes

  • Fixed bug when using sun elevation falling, light would not turn OFF.
  • Fixed bug in bypass when turning bypass OFF and using sun condition light would not turn OFF.
  • Fixed many bugs in home assistant restart.

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: