Add presence sensor management
This commit is contained in:
parent
56576021fa
commit
fdf945ae9d
|
|
@ -56,6 +56,11 @@ blueprint:
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
domain: switch
|
domain: switch
|
||||||
|
presence:
|
||||||
|
name: presence
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
domain: input_boolean
|
||||||
|
|
||||||
trigger_variables:
|
trigger_variables:
|
||||||
alarm_time: !input alarm_time
|
alarm_time: !input alarm_time
|
||||||
|
|
@ -67,6 +72,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
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: template
|
- platform: template
|
||||||
|
|
@ -97,6 +103,9 @@ condition:
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
entity_id: !input 'sleep_mode'
|
entity_id: !input 'sleep_mode'
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: !input 'presence'
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id: !input 'target_light'
|
entity_id: !input 'target_light'
|
||||||
data:
|
data:
|
||||||
|
|
@ -106,10 +115,13 @@ action:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: !input alarmed_turned_off
|
entity_id: !input alarmed_turned_off
|
||||||
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: 10
|
||||||
- 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
|
||||||
|
target:
|
||||||
|
entity_id: !input 'presence'
|
||||||
Loading…
Reference in a new issue