Add phone automations
This commit is contained in:
parent
6a7ff7a22e
commit
ccf646b7b7
39
automations/files/phone-automations.yaml
Normal file
39
automations/files/phone-automations.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
- id: phone-sleep-start
|
||||||
|
alias: '[Phone] Sleep start'
|
||||||
|
mode: single
|
||||||
|
trigger:
|
||||||
|
- platform: webhook
|
||||||
|
webhook_id: 56af98df-9477-431d-a38c-9cd42bc1c512
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ trigger.event.data.event == ''SLEEP_TRACKING_STARTED'' }}'
|
||||||
|
- condition: device
|
||||||
|
device_id: c76e890aeaf8b90472ce178076298aad
|
||||||
|
domain: device_tracker
|
||||||
|
entity_id: device_tracker.sm_g965f
|
||||||
|
type: is_home
|
||||||
|
action:
|
||||||
|
- service: script.goodnight
|
||||||
|
- service: notify.mobile_app_sm_g965f
|
||||||
|
data:
|
||||||
|
message: Sleep automation
|
||||||
|
|
||||||
|
- id: phone-sleep-end
|
||||||
|
alias: '[Phone] Sleep end'
|
||||||
|
mode: single
|
||||||
|
trigger:
|
||||||
|
- platform: webhook
|
||||||
|
webhook_id: 56af98df-9477-431d-a38c-9cd42bc1c512
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ trigger.event.data.event == ''SLEEP_TRACKING_STOPPED'' }}'
|
||||||
|
- condition: device
|
||||||
|
device_id: c76e890aeaf8b90472ce178076298aad
|
||||||
|
domain: device_tracker
|
||||||
|
entity_id: device_tracker.sm_g965f
|
||||||
|
type: is_home
|
||||||
|
action:
|
||||||
|
- service: script.goodmorning
|
||||||
|
- service: notify.mobile_app_sm_g965f
|
||||||
|
data:
|
||||||
|
message: Sleep automation
|
Loading…
Reference in New Issue
Block a user