Compare commits
2 commits
ecd3435bb2
...
576857a310
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
576857a310 | ||
|
|
ece9eb5685 |
|
|
@ -18,6 +18,14 @@ blueprint:
|
||||||
number:
|
number:
|
||||||
min: 0
|
min: 0
|
||||||
max: 30
|
max: 30
|
||||||
|
turn_off_delay:
|
||||||
|
name: Lights turn off delay
|
||||||
|
description: Belay before the lights turn off after waking up
|
||||||
|
default: 10
|
||||||
|
selector:
|
||||||
|
number:
|
||||||
|
min: 0
|
||||||
|
max: 30
|
||||||
binary_condition:
|
binary_condition:
|
||||||
name: Alarm today
|
name: Alarm today
|
||||||
description: Trigger the alarm today ?
|
description: Trigger the alarm today ?
|
||||||
|
|
@ -56,11 +64,21 @@ blueprint:
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
domain: switch
|
domain: switch
|
||||||
presence:
|
# presence:
|
||||||
name: presence
|
# name: presence
|
||||||
|
# selector:
|
||||||
|
# entity:
|
||||||
|
# domain: input_boolean
|
||||||
|
before_wake_up:
|
||||||
|
name: Before wake up action
|
||||||
|
description: Actions before the lights turn on
|
||||||
selector:
|
selector:
|
||||||
entity:
|
action:
|
||||||
domain: input_boolean
|
after_wake_up:
|
||||||
|
name: After wake up action
|
||||||
|
description: Actions after the lights turn on
|
||||||
|
selector:
|
||||||
|
action:
|
||||||
|
|
||||||
trigger_variables:
|
trigger_variables:
|
||||||
alarm_time: !input alarm_time
|
alarm_time: !input alarm_time
|
||||||
|
|
@ -72,7 +90,7 @@ variables:
|
||||||
target_light: !input target_light
|
target_light: !input target_light
|
||||||
# has_woken_up: !input has_woken_up
|
# has_woken_up: !input has_woken_up
|
||||||
sleep_mode: !input sleep_mode
|
sleep_mode: !input sleep_mode
|
||||||
presence: !input presence
|
# presence: !input presence
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: template
|
- platform: template
|
||||||
|
|
@ -101,11 +119,12 @@ condition:
|
||||||
# hours: 8
|
# hours: 8
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
- sequence: !input before_wake_up
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
entity_id: !input 'sleep_mode'
|
entity_id: !input 'sleep_mode'
|
||||||
- service: input_boolean.turn_on
|
# - service: input_boolean.turn_on
|
||||||
target:
|
# target:
|
||||||
entity_id: !input 'presence'
|
# entity_id: !input 'presence'
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id: !input 'target_light'
|
entity_id: !input 'target_light'
|
||||||
data:
|
data:
|
||||||
|
|
@ -117,11 +136,12 @@ action:
|
||||||
to: "on"
|
to: "on"
|
||||||
# - wait_template: "{{ is_state(has_woken_up, 'on') }}"
|
# - wait_template: "{{ is_state(has_woken_up, 'on') }}"
|
||||||
- delay:
|
- delay:
|
||||||
minutes: 10
|
minutes: !input turn_off_delay
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: !input 'target_light'
|
entity_id: !input 'target_light'
|
||||||
data:
|
data:
|
||||||
transition: 60
|
transition: 60
|
||||||
- service: input_boolean.turn_off
|
- sequence: !input after_wake_up
|
||||||
target:
|
# - service: input_boolean.turn_off
|
||||||
entity_id: !input 'presence'
|
# target:
|
||||||
|
# entity_id: !input 'presence'
|
||||||
Loading…
Reference in a new issue