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

@B.Spilner

You only need one automation not 2. Below is your adjusted code. Please use it and test it and see how I have used night lights with time condition.

alias: Main Lights & Night Lights From 5-10PM
description: ""
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    include_time:
      - time_on
    after_time: "17:00:00"
    light_switch:
      entity_id:
        - light.bonus_room_lamp
        - light.living_room_lamp
        - light.kitchen_under_cabinet
        - light.basement_lamp
    include_light_control:
      - use_brightness
      - use_transition
    include_night_lights: night_lights_enabled
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "20:00:00"
    night_lights_before_time: "22:00:00"
    night_lights:
      entity_id:
        - light.bonus_room_lamp
        - light.living_room_lamp
        - light.kitchen_under_cabinet
        - light.basement_lamp
    include_night_light_control:
      - use_brightness
      - use_transition
      - if_lights_are_on_adjust_when_crossing_over
    night_light_brightness: 17
    include_light_colour_control: use_rgb_colour
    include_night_light_colour_control: use_rgb_colour
    night_light_rgb_colour:
      - 54
      - 128
      - 247
    before_time: "22:00:00"
    night_light_transition_on: 5
    night_light_transition_off: 30
    light_brightness: 90
    light_transition_on: 5
    light_transition_off: 5

Blacky :smiley:

@linuxfreak

This Automation is slightly different to the sensor Light Blueprint. But I will look into it… Being Xmas I going to have a break but I see what I can do. It is on the list to look at but not making any promises as there will be a bit of logic.

Blacky :smiley:

Really appreciate your help! Ive done some trouble shooting and your code is working with my Hue strip but not Govee which leads me to believe its on my side.

EDIT: It was my Govee integration all along causing the issue!

I love love love this blueprint. Thank you @Blacky for all the hard work on this. I’m a long time fan of your Sensor Light blueprint and only just recently found this one perfect to cover standard or timed automations vs. event-driven lighting. With this one blueprint I’ve been able to streamline a whole load of automatons I’ve cobbled together over the past year or so.

Just one thing I’m not sure on… how to set the automation to ignore lights which are already on? It’s got to be through the “bypass” settings, surely, but I’m damned if I can figure it out!

Has anybody here got a similar use case to this and can point me in the right direction please?

Use case:

Automate the turning on of lights to a set brightness at a certain time
UNLESS the wife has already turned them on and set a colour, brightness etc., in which case leave them alone
Still turn them off on the schedule

@B.Spilner

Nice one, thanks for letting us know, glad you found the issue and it is now working :+1:

Enjoy

Blacky :smiley:

@eeeeeeeeeeeeean

Thanks for letting us know. This will be something I will need to fix and should just happen / work. I will put it on my list to do.

Blacky :smiley:

@deltabert

Move from sensor light blueprint

There are a few things to consider. When you turn OFF your router do you loose your network? If so then how will HA communicate and turn it back ON? If not then it will work. Below is your code you needed to enable the ON / OFF options and set your correct time.

alias: Smart Light Fritz!Box 7490 - Reset (Tapo 10)
description: Smart Light voor uit- en aanschakelen Fritz!Box 7490
use_blueprint:
  path: Blackshome/smart-light.yaml
  input:
    after_time: "02:15:00"
    before_time: "02:00:00"
    light_switch:
      entity_id: switch.tapo_smart_wcd_10
    include_time:
      - time_on
      - time_off

Blacky :smiley:

@eeeeeeeeeeeeean

Hi Ian

I have had a look at this and it already done. If the light is ON and the automation triggers the light to turn ON the light will stay as is and the light settings will not be effected.

Blacky :smiley:

Hi @Blacky, Thank you for your reply and the advice about the unavailability of my LAN when I switch off my router. To be honnest I had missed that. But I have two releaters in my network and hopefully these can keep the local LAN active.

But I have yet to test this.
Thank’s for your reaction. Bert

Hi,

This blueprint look great. Can you tell me if the countdown is restarted when the trigger goes ON before the end of the timer?

In other words, I don’t want the scene goes off when a motion is still detected.

Hi Blacky,
I saw that @psyko_chewbacca reported an issue that his lights turned on after a HA restart. In 2.3 you fixed some of these bugs, however, for me I still turns on all the connected lights of my automations after a restart/update.
Not 100% but I think it only applies to the Smart Light blueprint, not the Sensor Light.

Stifter