32 lines
768 B
YAML
32 lines
768 B
YAML
- id: front-door-doorbell
|
|
alias: '[Hallway] Doorbell'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.doorbell_button_switch
|
|
from: 'off'
|
|
to: 'on'
|
|
action:
|
|
- service: script.turn_on
|
|
entity_id: script.doorbell_bell
|
|
- service: notify.mobile_app_iphone_pg
|
|
data:
|
|
message: Doorbell
|
|
data:
|
|
actions:
|
|
- action: UNLOCK_DOOR
|
|
title: Unlock door
|
|
|
|
- id: hallway-doorbell-bell-burn-prevention
|
|
alias: '[Hallway] Doorbell bell burn prevention'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.doorbell_bell
|
|
from: 'off'
|
|
to: 'on'
|
|
for:
|
|
seconds: 1
|
|
action:
|
|
- service: switch.turn_off
|
|
entity_id: switch.doorbell_bell |