Add presence sensor management
This commit is contained in:
parent
56576021fa
commit
fdf945ae9d
|
|
@ -56,6 +56,11 @@ blueprint:
|
|||
selector:
|
||||
entity:
|
||||
domain: switch
|
||||
presence:
|
||||
name: presence
|
||||
selector:
|
||||
entity:
|
||||
domain: input_boolean
|
||||
|
||||
trigger_variables:
|
||||
alarm_time: !input alarm_time
|
||||
|
|
@ -67,6 +72,7 @@ variables:
|
|||
target_light: !input target_light
|
||||
# has_woken_up: !input has_woken_up
|
||||
sleep_mode: !input sleep_mode
|
||||
presence: !input presence
|
||||
|
||||
trigger:
|
||||
- platform: template
|
||||
|
|
@ -97,6 +103,9 @@ condition:
|
|||
action:
|
||||
- service: switch.turn_off
|
||||
entity_id: !input 'sleep_mode'
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: !input 'presence'
|
||||
- service: light.turn_on
|
||||
entity_id: !input 'target_light'
|
||||
data:
|
||||
|
|
@ -106,10 +115,13 @@ action:
|
|||
- platform: state
|
||||
entity_id: !input alarmed_turned_off
|
||||
to: "on"
|
||||
- wait_template: "{{ is_state(has_woken_up, 'on') }}"
|
||||
# - wait_template: "{{ is_state(has_woken_up, 'on') }}"
|
||||
- delay:
|
||||
minutes: 10
|
||||
- service: light.turn_off
|
||||
entity_id: !input 'target_light'
|
||||
data:
|
||||
transition: 60
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: !input 'presence'
|
||||
Loading…
Reference in a new issue