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

@dsim

Welcome to the community.

Thanks for you YAML.

There are a few things that are not correct.

  1. Trigger Time, you have only enable to use the OFF timeā€¦ you need to enable the ON time. Once yo enable the ON time then your time is ON at 12:25 am and OFF at 9:30 pm. I could be wrong but you may be after ON at 9:30 pm and OFF at 12:25 am if so adjust the times to your liking.

  2. Lights you can use devices only entities can be used. The link I am about to provide will link you to my sensor light blueprint FAQ but is the same as this blueprint and shows you how to expand down your device to entities. Click Here

  3. Weekdays Option because you have selected it to run every day then you donā€™t need to enable this option. Use this option when you want to limit the days it should run. Disable this option.

  4. Night Lights Settings you have enabled night lights but you have no lights selected or a condition to activate night lights. I think you would like this disabled.

I have fixed up you YAML below but you will still need to do expand down you device to entities as shown in item 2 above and make sure your ON and OFF times are correct as shown in item 1 above.

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
    include_time:
      - time_off
      - time_on
    after_time: "00:25:00"
    before_time: "21:30:00"
    light_brightness: 30
    light_switch:
      device_id: 06f2dd5abc9285578c370cf62bae65aa

Blacky :smiley:

This is the blueprint you need then. :bulb: Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time . It work with a motion sensor and has the LUX as a condition.

Blacky :smiley:

Thank you so much! It is working now.
I am now testing the transitions.
Thank you for the very nice script and your generosity for sharing.

Thanks, will do! What would be the trigger sensor? Since I donā€™t want it to work based on motion but just based on lux + condition on when Iā€™m home. Time is also not a great trigger because it can rain during the day or I can watch a movie at 1 AM. I use this Sensor Light blueprint for my bathroom/toilet/bedroom/hall and it works really well there! But not sure how this would work.

I am digging more into your script and wanted to know if you can help with the light transition. I see that if I chose RGB I can only set one color and I am not sure what the transition refers to. I thought that I could chose more than one color and the LED would have transitioned the different colors.

The following is the for the Light Control that shows the Red only. Is it possible to add more colors instead of being static in one only?
Thank you so much!

light_transition_on: 2
    light_transition_off: 3
    light_colour_temperature: 3600
    light_rgb_colour:
      - 255
      - 38
      - 0

I am confused.

Blacky :smiley:

Transition is the time it takes to go from OFF to ON and from NO to OFF.

You can only choose one colourā€¦ one for normal lights and another one for night lights.

Blacky :smiley:

Sorry for the confusion! :slight_smile: Let me rephrase. The light should turn on and get its brightness changed based on the illuminance sensor (which is part of my Hue motion sensor). Also when Iā€™m home and when a sensor Awake=on. (Which gets set automatically every day when I get into the living room and gets turned off when I go to sleep at night) Motion is not relevant as Iā€™m often sitting still in the living room.

If I use the Sensor Light blueprint, I need to specify a binary sensor as the trigger sensor which I donā€™t think is relevant because it just needs to use the illumination sensor. And when I use the Smart Light blueprint, itā€™s not turning on my light when illuminance is below the threshold.

Does that make sense? Thanks!

@TheAutomator

So the Smart Light blueprint will do it for you but you will need to create a template binary sensor to use in the bypass. This template binary sensor should be configured as follow

  1. Awake = ON and you are home = Binary sensor OFF

    else binary sensor ON

Then you use this in the bypass option 2 and set up you ambient.

Blacky :smiley: