Skip to content

Instantly share code, notes, and snippets.

@tuxflo
Created November 16, 2022 10:28
Show Gist options
  • Save tuxflo/dda5801e83bb7213cd0c02ed533787a3 to your computer and use it in GitHub Desktop.
Save tuxflo/dda5801e83bb7213cd0c02ed533787a3 to your computer and use it in GitHub Desktop.
ESPHome Garage Door
switch:
- platform: gpio
pin: D1
inverted: False
id: relay
- platform: gpio
pin: D2
inverted: False
id: right
- platform: gpio
pin: D4
id: LED
inverted: True
- platform: template
name: "Garage door left"
icon: "mdi:gate"
turn_on_action:
- switch.turn_on: relay
- switch.turn_on: LED
- delay: 500ms
- switch.turn_off: relay
- switch.turn_off: LED
- platform: template
name: "Garage door right"
icon: "mdi:gate"
turn_on_action:
- switch.turn_on: right
- switch.turn_on: LED
- delay: 500ms
- switch.turn_off: right
- switch.turn_off: LED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment