Skip to content

Instantly share code, notes, and snippets.

@SqyD
Last active September 5, 2019 20:15
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 SqyD/b311a27c700c21322f3f63a4754dddfc to your computer and use it in GitHub Desktop.
Save SqyD/b311a27c700c21322f3f63a4754dddfc to your computer and use it in GitHub Desktop.
The Big Red Rick Roll Button Project
esphome:
name: big_button
platform: ESP8266
board: d1_mini
wifi:
ssid: "WifiSSID
password: "yourwifipassword"
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
- platform: gpio
pin: D8
name: "Big Red Button"
media_extractor:
automation:
- alias: 'Big Red Rick Roll'
trigger:
platform: state
entity_id: binary_sensor.big_red_button
to: 'on'
action:
- service: media_extractor.play_media
entity_id:
- media_player.living_room_tv
data:
media_content_id: https://www.youtube.com/watch?v=dQw4w9WgXcQ
media_content_type: video/youtube
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment