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

Really appreciate the effort of giving me a custom config, but mine looks exactly the same than yours, except the time_off trigger because I don’t want the light to be off. It’s fine than after reaching Sun Elevation Descending - End Point the light remains the same.

What I see is that if I set 52, it never gets triggered when sun goes down, but testing at night with lower values, it does.

Do you think it’s possible there is an issue with high altitute value for the trigger?

There is no trace when the trigger is configured as 52 and sun crosses down this value, which means automatization does not even start.

alias: Smart Light
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_sun:
      - sun_falling
    include_dynamic_lighting: enable_sun_elevation_colour_brightness
    light_switch:
      entity_id: light.hue_color_lamp_1
    include_light_colour_control: disable_colour_control
    include_bypass: []
    include_light_control: []
    sun_elevation: 52
    dynamic_lighting_sun_elevation_start_falling: 52
    dynamic_lighting_max_brightness: 80
    include_entity_state: []
    dynamic_lighting_min_colour_temp: 4500
    dynamic_lighting_state_control: enable_state_control
    dynamic_lighting_state_control_activation_state: "on"
    dynamic_lighting_state_control_entity: input_boolean.luz_dinamica
    dynamic_lighting_sun_elevation_end_rising: 5
    dynamic_lighting_min_brightness: 40
    dynamic_lighting_max_colour_temp: 6000
    dynamic_lighting_sun_elevation_end_falling: 8

@Javato

Yes, but it wont be the blueprint. Check your sun elevation. See this FAQ on how to do this click here. You will probably find that your sun elevation never gets to 52 at the moment during this time of the year to where you live. It must go from above 52 to below 52.

Blacky :grinning:

Hi @Blacky,

Again, thank you very much for this one !

Could you clarify how the “HA Restart” option works? I’ve noticed that when HA starts up, all the lights using this blueprint with “HA Restart” enabled turn on at startup (even though they were off before the restart). It took me a while to identify the source of this issue, and I eventually set up a very simple automation to realize that this was the only option I hadn’t tested.

alias: TEST restart
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_entity_state: []
    light_switch:
      entity_id: light.office
    include_light_control: []
    include_dynamic_lighting: disable_dynamic_lighting
    include_bypass: []
    bypass_lights_on: []
    bypass_lights_off: []
    include_night_lights: night_lights_disabled
    night_lights_conditions: []
    night_lights_entity_state: []
    night_lights:
      entity_id: light.office
    include_night_light_control: []
    night_light_transition_on: 1
    dynamic_lighting_min_brightness: 20
    include_night_light_colour_control: disable_colour_control
    night_light_colour_temperature: 3000
    night_light_brightness: 40
    light_transition_on: 2
    light_transition_off: 2
    include_bypass_auto_off: []
    bypass_auto_off_delay: 1
    bypass_time_delay: 0
    light_brightness: 1
    include_button: []
    include_ha_restart: enable_ha_restart

best

HI Blacky,

Sorry for the delay in replying.

So lets start again and break it all down. I want to apply this automation to several entities, but I am assuming I can just copy and paste the final solution to other lights in the house.

Below are a list of the Entities

Lux Sensor
sensor.motion_eye_illuminance

Lights
Stair Light
light.stair_rail_led_strip_lighting
Hall Light
light.hall_way_mirror_lighting

Motion Sensor
binary_sensor.motion_eye_motion_detection
“Clear” or “Detected”

Front Door Lock (Yale)
Lock Status
lock.front_door
“Locked” or “Unlocked”
Door Position
binary_sensor.front_door_door
“Open” or “Closed”

Doorbell CCTV - Person Detection
binary_sensor.reolink_video_doorbell_wifi_person
“Clear” or “Detected”

Driveway CCTV - Person Detection
binary_sensor.driver_duo_camera_person
“Clear” or “Detected”

Next, I have tried to list out all the actions in to segments, sorry if its a bit complicatedly written,

ACTION 1
So first action is as there is no need for the lights to be on during the 8am and 3pm Monday to Friday, so we may as well turn them off to conserve energy and increase lifetime of the lights

Monday to Friday - 8am to 3pm
Set Stair Lights (light.stair_rail_led_strip_lighting) and Hall Lights (light.hall_way_mirror_lighting) to OFF

ACTION 2
The next 2 actions, are merely for lighting effect during day time hours when the family are together

Monday to Friday - 3pm to Lux Value (see further on)
Set Stair Lights (light.stair_rail_led_strip_lighting) and Hall Lights (light.hall_way_mirror_lighting) to 25% Brightness

Saturday to Sunday - 8am to Lux Value (see further on)
Set Stair Lights (light.stair_rail_led_strip_lighting) and Hall Lights (light.hall_way_mirror_lighting) to 25% Brightness

ACTION 3
The following action is to provide functional ambient lighting as darkness sets in. This starts are at a higher brightness of 85% when the lux is around 190, then dynamically dimming as the Lux value falls to full dark. Ensure the light is not overwhelming when its dark.
The one thing I am not sure what to do it the transition from the 25% effect lighting above, to the functional lighting below.

All Week
If Lux Value (sensor.motion_eye_illuminance) is below 190 lux, then dynamically change the brightness of the Stair Lights (light.stair_rail_led_strip_lighting) and Hall Lights (light.hall_way_mirror_lighting) from 85% @ 190 Lux, to 20% @ 0 Lux

ACTION 4
Next action is for Bed Time lights, by dimming the lights down to a low 5% during set hour

Dim lights to 5% after 11pm until 8am (Bedtime),

OVER-RIDE 1
Rights, now are a couple of over ride actions, that only last X amount of.
Firstly, if we are out, and then arrive home, it would be nice to have an automation that turns these lights on when we enter the house. So the below use the Doorbell Camera, which has person detection function, and the Door sensor, which senses if the door has been opened.

Arrive Home
IF
Lux Value (sensor.motion_eye_illuminance) is below 190 lux
AND
Doorbell CCTV - Person Detection (binary_sensor.reolink_video_doorbell_wifi_person) is “Detected”
AND
Door Position (binary_sensor.front_door_door) changed to Open

THEN
Change, Stair Lights (light.stair_rail_led_strip_lighting) and Hall Lights (light.hall_way_mirror_lighting) to 85%
for 5 minutes, then revert back to above automations

NOTE: What would be a really nice function here is if the Doorbell sensor has to happen first, followed by the door position senor. This would mean it has detected someone “entering the house”. Where is I simply walked out the house, both sensors would activate and turn on the lights. Pointless turning them on if I am exiting the house!

OVER-RIDE 2
Finally, The is the security side of the automation.
This is using the CCTVs Person Detection AI function to detect if someone enters the detection zone (which is around the cars). So if its between a set time, and the CCTV detect a person, then turn the lights on full (I will eventually do the whole house with this!!).

CCTV Monitored Lighting
IF
Between 11pm and 7am
AND
Driveway CCTV - Person Detection (binary_sensor.driver_duo_camera_person) changes to “Detected”

THEN
Change, Stair Lights (light.stair_rail_led_strip_lighting) and Hall Lights (light.hall_way_mirror_lighting) to 100%
for 10 mins, then revert back to above automations.

I hope this all makes sense, and I hope it maybe even gives you some ideas to develop your brilliant blueprint even more

Cheers
Russ

@Hugoliv

Sorry to hear that.

At the moment, you don’t have any triggers set up for the automation, so when it runs, it gets confused. Normally, there should be both an ON and an OFF trigger, and depending on the options you choose, there can still be some conflicts. This blueprint can be a bit tricky that way.

There’s an option to disable the “HA Restart” feature for this exact reason. If you disable it, everything should work fine.

Blacky :grinning:

1 Like

@Blacky,

Thank you. In reality, the automations causing issues don’t use an on/off entity trigger but rather ‘button’ on/off triggers. But it’s okay now, the lights aren’t switched on at startup !

Thanks !

1 Like

Hello @Blacky is there a way to use Presence Sensor and Lux to trigger.
Use Case-
I want the
lights to turn on when someone is present in the office and lux value is less than <30 and
turn off when no presence detected and
also turn off when presence is detected and lux value is greater than i.e., >30 (meaning there is enough day light in the room)

@tshan1727

You would use the sensor light blueprint with the ambient option.

I do have another blueprint that I been sitting on the fence to release it. Maybe it is time to do so. Keep an eye out for it. Once released I come back and answer this post again.

Blacky :grinning:

1 Like

Hi together,

i want to ask if my following usecase is possible to use this blueprint for.

i got 2 usecase in beginning:

  1. Bathroom ledbar
    This ledbar is alway on.
    But at day it should use white light and in the night it should be blue with 25% of brightness
  2. Walkway
    on the walkway i want to turn it on at sunset with 80% of brightness and at 11 oclock pm i want to reduce the brightness to 20%
    at 5 oclock am the brightness should switch back to 80% until sunrise

i’m not using at the moment any external triggers like an door sensor or so.

At the moment i’m just play around with this blueprint but it looks like not to work.

alias: Smart Light:Testing
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    light_switch:
      device_id: 52923c23dd5978ba8dda5c8bc7c75c83
    include_time:
      - time_on
      - time_off
    after_time: "09:51:00"
    before_time: "09:55:00"

Did i do anything wrong?
I only want to switch a light on and off at a timestamp.

Cheers Robert

@no_Legend

Yes you can do this. First thing… you cant use a device. Only entities are supported. I point you to another blueprint of mine FAQ but it all the same. Click here

When setting it up you will need to use night lights and use the night lights time condition. In night light control make sure you select If lights are ON, adjust the lights when crossing over.

Enjoy

Blacky :grinning:

1 Like

Which Blueprint do you point to?

Thanks for you fast answer! Thanks a lot! It works now.
But if the blueprint is only supporting entities why is it possible to select an device?

Cheers Robert

@no_Legend

It is the sensor light blueprint FAQ but is is the same.

This is a target selector. I have allowed it because when I first made the blueprint you could select anything but as it evolved we needed to only select entities. I left it there because it an easy way to select your entities by selecting an area, then a device then your entity. It is quick and easy.

Blacky :grinning:

1 Like

@tshan1727

This is the blueprint to use

:globe_with_meridians: Zone Presence of People & Devices

If you create a Presence Helper (Toggle Helper) then copy and paste that toggle helper into the :bulb: Sensor Light blueprint Trigger, add your lights then set up the Ambient options.

Blacky :grinning:

1 Like

Hello Blacky and team.

I am getting the message " This automatisation doesn’t have any input ".
Can you point me in the good direction to fix this ?
I have put the automation up …but it never turn it on .

Have a great Friday everyone

Michel

@frenemj8

Welcome to the community.

Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on “</>” and paste code in there.

Blacky :grinning:

Hello,
so how do I automate the Presence Helper using the Zone Presence blueprint?
I select zone, People, Helper but there is no dependency on Presence Sensor to Presence Helper, not sure how Helper is going to update based on Presence Sensor, if that make sense?
Maybe I am not getting it:(

@tshan1727

First you set up the :globe_with_meridians: Zone Presence of People & Devices Blueprint and use the Presence Helper Option. This will turn ON the helper when someone is present in the office (zone). You have to track them so you know if someone is at the office (zone). Can you do this? If you don’t know how to do this then maybe ask under that blueprint thread.

If you can track them then you would use the :bulb: Sensor Light blueprint. You would then copy and past the Presence helper (toggle helper) entity ID into the trigger and set up your lights. That will turn ON the light whenever someone is in the office.

Next your condition is to only turn the lights ON if the lux sensor is below 30. To do this use the Ambient condition in the sensor light blueprint (not this smart light blueprint but the sensor light blueprint). Add you lux sensor in and set your Low Lux Value to 30 and your High Lux Value to 60 (you need to decide this setting).

Now you lights will only come ON if someone is in the office and your lux sensor is below 30.

Blacky :grinning:

I guess I was hung up on the zone part. Maybe I am no thinking this right but my office is the other room, so I am always in the house however I have a presence sensor(Xiaomi) which has been working great as long as I am in the office, and it quickly detects within 3-5 seconds when I leave. I was trying to use this sensor to turn on/off the helper, idk if this make sense.

Hi Blacky,

Any joy on this sir?

@tshan1727

That changes everything!

Just use the :bulb: Sensor Light blueprint and have your presence sensor(Xiaomi) as the trigger. That is what the blueprint is designed for.

Blacky :grinning: