esphome-docs/devices/sonoff_t3_eu_3gang_v1.0.yaml
2021-11-03 19:55:26 +01:00

85 lines
1.6 KiB
YAML

esphome:
name: <NAME_OF_NODE>
platform: ESP8266
board: esp01_1m
# Automation turning on the blue status LED once T3 is booted up
on_boot:
priority: -10
then:
- light.turn_on: blue_led_light
wifi:
ssid: <YOUR_SSID>
password: <YOUR_PASSWORD>
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode:
input: true
pullup: true
inverted: true
name: "Sonoff T3 EU 3 Gang Touchpad 1"
on_press:
- switch.toggle: relay_1
- platform: gpio
pin:
number: GPIO9
mode:
input: true
pullup: true
inverted: true
name: "Sonoff T3 EU 3 Gang Touchpad 2"
on_press:
- switch.toggle: relay_2
- platform: gpio
pin:
number: GPIO10
mode:
input: true
pullup: true
inverted: true
name: "Sonoff T3 EU 3 Gang Touchpad 3"
on_press:
- switch.toggle: relay_3
- platform: status
name: "Sonoff T3 EU 3 Gang Status"
switch:
- platform: gpio
name: "Sonoff T3 EU 3 Gang Relay 1"
pin: GPIO12
id: relay_1
- platform: gpio
name: "Sonoff T3 EU 3 Gang Relay 2"
pin: GPIO5
id: relay_2
- platform: gpio
name: "Sonoff T3 EU 3 Gang Relay 3"
pin: GPIO4
id: relay_3
output:
# Register the blue LED as a dimmable output ....
- platform: esp8266_pwm
id: blue_led
pin: GPIO13
inverted: true
light:
# ... and then make a light out of it.
- platform: monochromatic
name: "Sonoff T3 EU 3 Gang Blue LED"
output: blue_led
internal: true
id: blue_led_light