Skip to content

Instantly share code, notes, and snippets.

@smarthomehobby
Created September 3, 2018 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smarthomehobby/ad3e9384da3f264c2f246bd47b692451 to your computer and use it in GitHub Desktop.
Save smarthomehobby/ad3e9384da3f264c2f246bd47b692451 to your computer and use it in GitHub Desktop.
################################################
## Gen 2 Button Automations & Scripts
################################################
- id: doorbell
alias: Doorbell
initial_state: 'on'
trigger:
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0002134dde
click_type: single
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0002134dde
click_type: double
action:
service: homeassistant.turn_on
entity_id:
- script.doorbell
Add to scripts.yaml
doorbell:
sequence:
- service: hassio.addon_stdin
data:
addon: de3cd379_audio_player
input: "https://YOUR_RASPBERRY_PI'S_IP:8123/local/doorbell.mp3"
- service: ifttt.trigger
data: {"event":"text_notification", "value1":"Someone rang the doorbell."}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment