Purpose
This Blueprint allows you to select 1+ lights/light groups and their default brightness and color temperature. It also work for bulbs that only have brightness and do not have a color temperature option.
Why
This is useful for lights that do not have a default brightness/color temperature for when they turn on (like Sengled zigbee bulbs) and instead turn on to the state they were when they were turned off. So, if you set your lights at 10% in the evening then turned them off, they will be at 10% when you turn them on in the morning instead of 100% like you prefer.
Although Home Assistantâs Default Turn-on Value supports brightness and x/y color it does not support color temperature. In addition, for lights that do have a Default Turn-on Value they sometimes do not quickly check for brightness when they are first physically powered on versus turned on by automation, UI, or smart switch.
blueprint:
name: Default turn-on brightness and color temperature for light(s)
author: noblewolf
description: Resets bulb(s)'s color and brightness when it turns on. Although Home
Assistant has a Default Turn-on Value (https://www.home-assistant.io/integrations/light/#default-turn-on-values)
for lights it does not support color temperature, and some bulbs (zigbee) do not
quickly check when they are first physically powered on versus turned on by
automation, UI, or smart switch.
domain: automation
input:
target_lights:
name: Lights
description: 'The light(s) you want to auto reset to your default settings when
they turn on. For more than one, add a comma and no spaces between the full
entity names. Example: light.lamp_left,light.lamp_right'
selector:
entity:
domain: light
light_color_temperature:
name: Color Temperature
description: 'Choose the color temperature. Examples: Cool White: 154; Daylight
White: 181; White: 250; Soft White: 370; Warm White: 454'
default: 370
selector:
number:
min: 154.0
max: 500.0
unit_of_measurement: mireds
mode: slider
step: 1.0
light_brightness:
name: Brightness
description: Choose the brightness.
default: 255
selector:
number:
min: 1.0
max: 255.0
mode: slider
step: 1.0
alias: Bulb toggle set to default (Soft White) (BP)
description: 'When a bulb goes from off to on (usually toggling the physical switch)
it sends a light.turn_on to force the light to go to its default state, because
physical toggle does not trigger the default state unless the light power is off
for ~30 sec. (It does go to default instantly if toggled via software.
This is useful when the bulb''s previous/current state is not what you want as default.'
trigger:
platform: state
entity_id: !input 'target_lights'
condition: []
action:
choose:
- conditions:
- condition: template
value_template: '{{ trigger.from_state.state == ''off'' }}'
sequence:
- service: light.turn_on
data:
color_temp: !input 'light_color_temperature'
brightness: !input 'light_brightness'
entity_id: '{{ trigger.entity_id }}'
default: []
mode: parallel
max: 100
Changelog
2021, Mar 3
Added My Home Assistant import link
2021, Jan 5
Initial commit


