2019-03-05 18:33:18 +01:00
|
|
|
esphome:
|
|
|
|
name: <NAME_OF_NODE>
|
2022-02-10 23:10:43 +01:00
|
|
|
|
2019-03-05 18:33:18 +01:00
|
|
|
# Automation turning on the blue status LED once T1 is booted up
|
|
|
|
on_boot:
|
|
|
|
priority: -10
|
|
|
|
then:
|
|
|
|
- light.turn_on: blue_led_light
|
|
|
|
|
2022-02-10 23:10:43 +01:00
|
|
|
esp8266:
|
|
|
|
board: esp01_1m
|
|
|
|
|
2019-03-05 18:33:18 +01:00
|
|
|
wifi:
|
2022-02-10 23:10:43 +01:00
|
|
|
ssid: !secret wifi_ssid
|
|
|
|
password: !secret wifi_password
|
2019-03-05 18:33:18 +01:00
|
|
|
|
|
|
|
# Enable logging
|
|
|
|
logger:
|
|
|
|
|
|
|
|
# Enable Home Assistant API
|
|
|
|
api:
|
|
|
|
|
|
|
|
ota:
|
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO0
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2019-03-05 18:33:18 +01:00
|
|
|
name: "Sonoff T1 UK 3 Gang Touchpad 1"
|
|
|
|
on_press:
|
|
|
|
- switch.toggle: relay_1
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO9
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2019-03-05 18:33:18 +01:00
|
|
|
name: "Sonoff T1 UK 3 Gang Touchpad 2"
|
|
|
|
on_press:
|
|
|
|
- switch.toggle: relay_2
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO10
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2019-03-05 18:33:18 +01:00
|
|
|
name: "Sonoff T1 UK 3 Gang Touchpad 3"
|
|
|
|
on_press:
|
|
|
|
- switch.toggle: relay_3
|
|
|
|
- platform: status
|
|
|
|
name: "Sonoff T1 UK 3 Gang Status"
|
|
|
|
|
|
|
|
switch:
|
|
|
|
- platform: gpio
|
|
|
|
name: "Sonoff T1 UK 3 Gang Relay 1"
|
|
|
|
pin: GPIO12
|
|
|
|
id: relay_1
|
|
|
|
- platform: gpio
|
|
|
|
name: "Sonoff T1 UK 3 Gang Relay 2"
|
|
|
|
pin: GPIO5
|
|
|
|
id: relay_2
|
|
|
|
- platform: gpio
|
|
|
|
name: "Sonoff T1 UK 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
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2019-03-05 18:33:18 +01:00
|
|
|
|
|
|
|
light:
|
|
|
|
# ... and then make a light out of it.
|
|
|
|
- platform: monochromatic
|
|
|
|
name: "Sonoff T1 UK 3 Gang Blue LED"
|
|
|
|
output: blue_led
|
|
|
|
internal: true
|
|
|
|
id: blue_led_light
|