Edited see bottom of post
This is my first blueprint share, and I’m putting it up here because I couldn’t find anything like it,
What this blueprint does
it will dim a total of 3 seperate lights to a different brightness at sunset or sunrise or when the lights are turned on, as not every room in the house needs the same brightness you can change the brightness of each light to your desired amount
You will need to create a input select (dropdown) from the helpers located in devices and integrations, this must have 2 options Day and Night, . you will then have to create a automation to trigger the dropdown to go to night when the sunsets, I’ve created a blueprint for this also. Here is the link
Day Night Input Select Blueprint Link
Enjoy!!!
blueprint:
domain: automation
name: Better Dimmable Lighting
description: Automatically adjust your lights to seperate levels when sun sets or rises
input:
day_input_select:
name: Day Night Input Select
description: Create a Day/Night input select in helpers and add here
selector:
entity:
domain: input_select
trigger_light:
name: Light
description: add your light here
selector:
entity:
domain: light
sunrise_on:
name: Sunrise On
description: leave the light as it is will change brightness if the light is on, if the light is off it will stay off
default: "on"
selector:
select:
options:
- label: Turn The Light On At Sunrise
value: "off"
- label: Leave The Light As It Is
value: "on"
sunset_on:
name: Sunset On
description: leave the light as it is will change brightness if the light is on, if the light is off it will stay off
default: "on"
selector:
select:
options:
- label: Turn The Light On At Sunset
value: "off"
- label: Leave The Light As It Is
value: "on"
brightness_day_one:
name: Brightness Day
description: the brightness of your light through the day
default: 50
selector:
number:
max: 100
min: 1
unit_of_measurement: "%"
mode: slider
brightness_night_one:
name: Brightness Night
description: the brightness of your light at night
default: 50
selector:
number:
max: 100
min: 1
unit_of_measurement: "%"
mode: slider
transition_one:
name: Transition Time
description: If the light is on at sunset/sunrise this is how long it will take to get to max or minimum brightnes
default: 150
selector:
number:
max: 300
min: 1
unit_of_measurement: seconds
mode: slider
dim_start:
name: Starting Brightness (debug)
description: If your light transition time isnt working then set this till the light just turns on
default: 10
selector:
number:
min: 1
max: 30
unit_of_measurement: "%"
mode: slider
variables:
light: !input trigger_light
trigger:
- platform: state
entity_id:
- !input day_input_select
to: Night
id: Night
- platform: state
entity_id:
- !input day_input_select
to: Day
id: Day
- platform: state
entity_id:
- !input trigger_light
to: "on"
id: Light 1
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.entity_id == light }}"
sequence:
- if:
- condition: state
entity_id: !input day_input_select
state: Night
then:
- service: light.turn_on
data:
brightness_pct: !input brightness_night_one
target:
entity_id: !input trigger_light
else:
- service: light.turn_on
data:
brightness_pct: !input brightness_day_one
target:
entity_id: !input trigger_light
- conditions:
- condition: state
entity_id: !input day_input_select
state: Night
sequence:
- if:
- condition: state
entity_id: !input trigger_light
state: 'on'
then:
- service: light.turn_on
data:
brightness_pct: !input brightness_night_one
transition: !input transition_one
target:
entity_id: !input trigger_light
else:
- if:
- condition: state
entity_id: !input trigger_light
state: !input sunset_on
then:
- service: light.turn_on
data:
brightness_pct: !input dim_start
target:
entity_id: !input trigger_light
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: light.turn_on
data:
transition: !input transition_one
brightness_pct: !input brightness_night_one
target:
entity_id: !input trigger_light
- conditions:
- condition: state
entity_id: !input day_input_select
state: Day
sequence:
- if:
- condition: state
entity_id: !input trigger_light
state: 'on'
then:
- service: light.turn_on
data:
brightness_pct: !input brightness_day_one
transition: !input transition_one
target:
entity_id: !input trigger_light
else:
- if:
- condition: state
entity_id: !input trigger_light
state: !input sunrise_on
then:
- service: light.turn_on
data:
brightness_pct: !input dim_start
target:
entity_id: !input trigger_light
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: light.turn_on
data:
transition: !input transition_one
brightness_pct: !input brightness_day_one
target:
entity_id: !input trigger_light
default: []
mode: single
Edit
Blueprint has been updated, for ease of use I have changed it to only 1 light, this way you can create an automation for each individual light
I have added in whether or not you want the light to turn on at sunset and sunrise
I have also added transition time for when the light turns on at sunset or sunrise, transition time won’t affect the lights if you are just turning them on throughout the day
I also added a transition time debug, some lights won’t trigger on until they hit a certain percentage, so setting a light to 100% and then setting the transition time 5 minutes will just turn the light onto 100%. The way around this is to turn the light onto its minimum brightness and then let the light go from that to the brightness you have set.
Leave debug at 10% if you don’t have an issue, if the transition time isn’t working then try increasing it till your light is just barely on