1
0
Fork 0
ansible-home-assistant/automations/files/hallway-doorbel.yaml
Przemek Grondek d6e51c1bde Change hallway doorbell automation
add phone notification
 decrease rebound to 1s
2021-01-23 19:37:52 +01:00

44 lines
No EOL
1,003 B
YAML

- id: hallway-doorbell
alias: '[Hallway] Doorbell'
mode: restart
trigger:
- platform: state
entity_id: switch.doorbell_switch
from: 'off'
to: 'on'
action:
- service: notify.notify
data:
message: "Doorbell"
- service: light.turn_on
data:
brightness: 200
rgb_color:
- 49
- 27
- 146
entity_id: light.computer_lights
- service: light.turn_on
data:
flash: long
brightness: 200
rgb_color:
- 49
- 27
- 146
entity_id: light.computer_lights
- delay: '30'
- service: light.turn_off
entity_id: light.computer_lights
- id: hallway-doorbell-burn-prevention
alias: '[Hallway] Doorbell burn prevention'
mode: restart
trigger:
- platform: state
entity_id: switch.doorbell_switch
from: 'off'
to: 'on'
action:
- delay: '1'
- service: switch.turn_off
entity_id: switch.doorbell_switch