Created
August 6, 2019 14:26
-
-
Save tribut/ddde2ef1e2fa3919c50c4ab9c03e7056 to your computer and use it in GitHub Desktop.
Esphome config for DS102 (3 Gang)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
device_name: your_device_name | |
friendly_name: "Your Device Name" | |
api_password: !secret api_password | |
ota_password: !secret ota_password | |
esphome: | |
name: ${device_name} | |
platform: ESP8266 | |
board: esp01_1m | |
wifi: | |
ssid: !secret wifi_name | |
password: !secret wifi_pass | |
fast_connect: True | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: ${api_password} | |
ota: | |
password: ${ota_password} | |
# Status LED | |
status_led: | |
pin: | |
number: GPIO0 | |
inverted: True | |
binary_sensor: | |
- platform: gpio | |
pin: | |
number: GPIO12 | |
mode: INPUT_PULLUP | |
inverted: True | |
name: "${friendly_name} Button Left" | |
on_press: | |
- switch.toggle: relay_1 | |
- platform: gpio | |
pin: | |
number: GPIO3 | |
mode: INPUT_PULLUP | |
inverted: True | |
name: "${friendly_name} Button Middle" | |
on_press: | |
- switch.toggle: relay_2 | |
- platform: gpio | |
pin: | |
number: GPIO5 | |
mode: INPUT_PULLUP | |
inverted: True | |
name: "${friendly_name} Button Right" | |
on_press: | |
- switch.toggle: relay_3 | |
switch: | |
- platform: gpio | |
name: "${friendly_name} Relay Left" | |
pin: GPIO13 | |
id: relay_1 | |
on_turn_on: | |
- light.turn_on: left_led_light | |
on_turn_off: | |
- light.turn_off: left_led_light | |
- platform: gpio | |
name: "${friendly_name} Relay Middle" | |
pin: GPIO4 | |
id: relay_2 | |
on_turn_on: | |
- light.turn_on: middle_led_light | |
on_turn_off: | |
- light.turn_off: middle_led_light | |
- platform: gpio | |
name: "${friendly_name} Relay Right" | |
pin: GPIO15 | |
id: relay_3 | |
on_turn_on: | |
- light.turn_on: right_led_light | |
on_turn_off: | |
- light.turn_off: right_led_light | |
output: | |
- platform: esp8266_pwm | |
id: left_led | |
pin: GPIO16 | |
inverted: True | |
- platform: esp8266_pwm | |
id: middle_led | |
pin: GPIO14 | |
inverted: True | |
- platform: esp8266_pwm | |
id: right_led | |
pin: GPIO1 | |
inverted: True | |
light: | |
- platform: monochromatic | |
name: "${friendly_name} LED Left" | |
output: left_led | |
internal: true | |
id: left_led_light | |
- platform: monochromatic | |
name: "${friendly_name} LED Middle" | |
output: middle_led | |
internal: true | |
id: middle_led_light | |
- platform: monochromatic | |
name: "${friendly_name} LED Right" | |
output: right_led | |
internal: true | |
id: right_led_light |
Hey @faxemaxee,
great to hear you were successful. I only own the 1- and 3-gang variants, so I would not have been of much help anyway. Not surprised that the 2-gang template is erroneous though, there were problems with the other templates as well.
Cheers
felix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found a solution in an open issue, for everyone coming here to find the answer: here
or the actual template:
{"NAME":"DS-102 2 Gang","GPIO":[158,57,0,17,22,18,0,0,0,21,56,255,0],"FLAG":0,"BASE":18}