-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
37 lines (37 loc) · 1.47 KB
/
scripts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
wakeup_bedroom:
alias: 'Wakeup lighting, smooth transition'
sequence:
- service: light.turn_on
data_template:
entity_id: light.my_bedroom
brightness: 1
kelvin: 1000
- delay:
seconds: 1
- service: light.turn_on
data_template:
entity_id: light.my_bedroom
brightness: 64
kelvin: 2000
transition: '{{ (( states.input_number.wakeup_duration.state | float * 60 / 4 )| round ) | int }}'
- delay: '00:00:{{ (( states.input_number.wakeup_duration.state | float * 60 / 4 )| round ) | int }}'
- service: light.turn_on
data_template:
entity_id: light.my_bedroom
brightness: 128
kelvin: 3000
transition: '{{ (( states.input_number.wakeup_duration.state | float * 60 / 4 )| round ) | int }}'
- delay: '00:00:{{ (( states.input_number.wakeup_duration.state | float * 60 / 4 )| round ) | int }}'
- service: light.turn_on
data_template:
entity_id: light.my_bedroom
brightness: 191
kelvin: 4000
transition: '{{ (( states.input_number.wakeup_duration.state | float * 60 / 4 )| round ) | int }}'
- delay: '00:00:{{ (( states.input_number.wakeup_duration.state | float * 60 / 4 )| round ) | int }}'
- service: light.turn_on
data_template:
entity_id: light.my_bedroom
brightness: 255
kelvin: 5000
transition: '{{ (( states.input_number.wakeup_duration.state | float * 60 / 4 )| round ) | int }}'