trying script blueprint

This commit is contained in:
Stephen Kuntz 2024-09-24 09:02:02 -04:00
parent 68c9fdf64b
commit df4e8fb24e

View File

@ -9,75 +9,75 @@ blueprint:
homeassistant:
min_version: 2024.9.0
fields:
target_kelvin:
description: Coldest Kelvin value. This is the end value - most white
selector:
color_temp:
unit: kelvin
default: 6500
name: Coldest Kelvin
start_kelvin:
description: >-
This is the start value. If the light is on the current value from the
state of the light will be used and this will be ignored.
selector:
color_temp:
unit: kelvin
min: 2500
max: 6500
default: 6500
name: Warmest Kelvin
max_brightness_pct:
description: Maximum brightness in percent to reach by the end of the script
selector:
number:
min: 1
max: 100
default: 80
name: Max brightness
alarm_length:
description: >-
This is the start to finish time. Take this into account when setting up
the automation this script is called by.
selector:
number:
min: 1
max: 60
default: 10
name: Alarm Length
steps_per_minute:
description: How many steps per minute
selector:
number:
min: 1
max: 12
default: 12
name: Steps Per minute
target_light:
description: A single light or group
selector:
entity:
filter:
domain: light
name: Target Light
light_timeout:
description: >-
Minutes to delay after Max Brightness has been reached to turn the light
back off. Value of 0 disables the timeout
selector:
number:
min: 0
max: 60
default: 5
name: Light Timeout
target_kelvin:
description: Coldest Kelvin value. This is the end value - most white
selector:
color_temp:
unit: kelvin
default: 6500
name: Coldest Kelvin
start_kelvin:
description: >-
This is the start value. If the light is on the current value from the
state of the light will be used and this will be ignored.
selector:
color_temp:
unit: kelvin
min: 2500
max: 6500
default: 6500
name: Warmest Kelvin
max_brightness_pct:
description: Maximum brightness in percent to reach by the end of the script
selector:
number:
min: 1
max: 100
default: 80
name: Max brightness
alarm_length:
description: >-
This is the start to finish time. Take this into account when setting up
the automation this script is called by.
selector:
number:
min: 1
max: 60
default: 10
name: Alarm Length
steps_per_minute:
description: How many steps per minute
selector:
number:
min: 1
max: 12
default: 12
name: Steps Per minute
target_light:
description: A single light or group
selector:
entity:
filter:
domain: light
name: Target Light
light_timeout:
description: >-
Minutes to delay after Max Brightness has been reached to turn the light
back off. Value of 0 disables the timeout
selector:
number:
min: 0
max: 60
default: 5
name: Light Timeout
variables:
alarm_length: !input alarm_length
steps_per_minute: !input steps_per_minute
target_light: !input target_light
max_brightness_pct: !input max_brightness_pct
target_kelvin: !input target_kelvin
start_kelvin: !input start_kelvin
light_timeout: !input light_timeout
# alarm_length: !input alarm_length
# steps_per_minute: !input steps_per_minute
# target_light: !input target_light
# max_brightness_pct: !input max_brightness_pct
# target_kelvin: !input target_kelvin
# start_kelvin: !input start_kelvin
# light_timeout: !input light_timeout
steps: "{{ alarm_length * steps_per_minute }}"
min_brightness: |-