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

@dbeer

Smart Light works of 4 different triggers to turn ON and OFF. You can also mix and match them. Use case, to turn ON lamps at sunset and OFF at time.

Sensor Light works with a motion sensor, has delays to keep it ON and conditions that must be met for it to run.

This is basic but when I get time I will do a FAQ in more detail.

If you are unsure please provide your use case and I can guide you to what one would suit best.

Blacky :smiley:

Thank you. I will try out this one then.

Unfortunately, Iā€™m failing to import this blueprint (via the button at the top of this topic) with the following error code:

Invalid blueprint: extra keys not allowed @ data['blueprint']['input']['bypass_settings']['collapsed']. Got True extra keys not allowed @ data['blueprint']['input']['bypass_settings']['icon']. 

I searched this topic, but didnā€™t find anyone having the same issue.

What am I doing wrong?

@dbeer

You must be on Home Assistant Version 2024.6 or later. If you can update your Home Assistant you will then be able to import it.

Blacky :smiley:

Thank you for your swift reply. It worked. My apologies for this rookie mistake.

Awesome! Just upgraded to v2.3.

I noticed an option to enable/disable the automation on certain days of the week. Is it possible to add specific timeframes for that? For example: Only enable between 7am and 10pm? Or more specific; only enable between 8am and 6pm on Monday?

And another question: I would like to have the lights turned on only when somebody is home. I have a group that monitors this. If I add the group to the by-pass option (Bypass Switch - Turn lights OFF), will the lights not turn off when the group is off?

Iā€™ve been able to import this blueprint, but am lost by the amount of options.

However, Iā€™m lost by the amount of optionsā€¦

My objective is to

  • turn on certain lights in our location, starting when the sun goes down and increase them gradually - but only if user X is home
  • adjust light brightness and temperature so that when I turn them on via a switch or manually,nit has a brightness and temperature corresponding to the time of day.

Any direction for a blueprint -newbee would be appreciated, thanks!

@beurdy

This blueprint is not designed for this, it is more of a trigger you would like to happen. You may want to look at my Sensor Light Blueprint.

No, bypass works when an entity is ON the bypass is active and will do as per your selection. What you could do is use the group so when it is ON it turns the lights on and when it is OFF the light turn OFF. This would be done in a state trigger.

Blacky :smiley:

There is no condition for this so you will need to look at my sensor light blueprint.

You can do that in this one using the state condition.

Blacky :smiley:

@Blacky
Good work on this one!
Can I use this blueprint or another to achieve the following:

  1. Turn on lights outside garage at 50% brightness when lux sensor drops below xxx.

  2. When motion sensor outside garage detects movement turn up lights to 100% for x minutes, then down to 50% again.

  3. Then turn off lights when lux goes above xxx

Hope you understand my question?

@flaektrem

I recommend taking a look at my :bulb: Sensor Light Blueprint.

First, youā€™ll need to set up a trigger. If youā€™re aiming to run this at night, create a schedule helper that starts well before dark and ends at the time youā€™d like it OFF. If itā€™s meant to run 24/7, create a toggle helper instead. Simply copy and paste the toggle helper ID into the trigger input, then turn it ON.

Once your trigger is set up, use the ambient settings to adjust your lights to 50%.

For night lights, use your motion sensor as the state condition and set the lights to 100%.

This should give you the result youā€™re looking for. If you have more questions or are using the Sensor Light Blueprint, feel free to post them in that thread, and Iā€™ll be happy to assist further.

Blacky :smiley:

1 Like

Thank you for your quick reply.

Regarding:

I want to clarify the part about ā€œonly if user X is homeā€. This is not referring to presence / motion detection, but rather to a person entity based on the ā€œPersonā€ integration.

@dbeer

In this blueprint there in no real condition other than weekday. This blueprint is for ON / OFF. I use it for light come ON when sun goes down and then switch OFF at X time. It will do this without any conditions. Another example say your office hours are from 9am to 5pm you can turn the lights ON and OFF. This is what this blueprint is used for. If you would like some conditions then best to use the sensor light blueprint.

Blacky :smiley:

Blacky, is it possible to have finer control on the lux levels ? Now it is usable with 10 point steps and that is not detailed enough for me.

Thanks

@BigBen

Hi Joost, just simply type the value in and then click save.

Blacky :smiley:

@Blacky arghhh, in the UI it flashes red when you insert numbers manually so I thought it was not allowed. thanks a lot.

I Love your blueprints, thanks for sharing.

1 Like

Hey Blacky! Iā€™ve tried the Smart Light blueprint but itā€™s not turning on my light. Iā€™ve tried to keep the blueprint config really simple and can confirm the entity ID is correct for both the light and illuminance. Can also confirm the illuminance right now is 14 which is way under the ambient light value. Can you see what I did wrong? The traces are quite complex so Iā€™m not sure what info I should provide. Iā€™m using ZHA with a Conbee II stick and a Philips Hue lamp + movement sensor which has an illuminance sensor in it. Thanks!

id: '1727692116475'
alias: Light - Living Room
description: ''
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    light_switch:
      entity_id: light.living_room
    include_ambient:
      - ambient_low
    ambient_light_value: 90
    ambient_light_value_off: 280
    ambient_light_sensor: sensor.living_room_illuminance

Hi, I have tried to use your blueprint. I just need to set time on/off. I have selected the Trigger time on and off, then In Lights I chose the device I want to be triggered on and off, then in Weekdays the days I want the lights to be switched on and off. I do not have motion sensors or other devices. However, after many attempts the system cannot run the automation and trigger the lights. I am new with HA and still mastering it so, any help is very much appreciated

Here is the YAML:

alias: Strip light
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_light_control:
      - use_transition
      - use_brightness
    include_light_colour_control: use_rgb_colour
    weekday_options:
      - sun
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
    include_entity_state: []
    include_time:
      - time_off
    after_time: 00:25:00
    before_time: 21:30:00
    include_weekdays: weekday_enabled
    night_lights_conditions: []
    night_lights_after_time: 23:51:00
    night_lights_before_time: 23:52:00
    include_night_light_control: []
    include_night_lights: night_lights_enabled
    light_brightness: 30
    light_switch:
      device_id: 06f2dd5abc9285578c370cf62bae65aa
    include_sun: []

@TheAutomator

Iā€™ve tested your YAML, and it worked perfectly. Youā€™ve set a Low Lux Value of 90, so for the automation to trigger, the LUX value must go from above 90 to below 90. When that happens, the light will turn ON.

If youā€™re adjusting the settings in the blueprint and your current LUX value is, say, 80, the automation wonā€™t trigger because it needs to cross from above 90 to below 90.

Also, note that youā€™ve only set it to turn the light ON, so the automation wonā€™t turn it OFF. Iā€™m not sure if thatā€™s what you intended.

Make sure your sensor.living_room_illuminance reports the lux value. It looks like it is correct but I am just checking.

Blacky :smiley:

Ah now I get it! It needs to cross from above 90 to below 90 sounds like the key point to me. I would like it to always respond/trigger on the motion sensor, not only when it crosses. I found this blueprint that does that: Home Assistant Blueprint: Smart Lux Dimmer (github.com)

I have all my lights under your blueprints now so it would be awesome to get this one on it too! I donā€™t know how to fix it thoughā€¦ Is it because of the trigger that has the above/below values defined while the blueprint I shared has them as a condition?

Correct on your other points - I wanted to keep the blueprint as simple as possible to get it to work first which makes troubleshooting easier. Hence the turn off functionality hasnā€™t been implemented yet :slight_smile: