forked from esphome/esphome-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsonoff_t1_uk_3gang_v1.1.yaml
86 lines (76 loc) · 1.61 KB
/
sonoff_t1_uk_3gang_v1.1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
esphome:
name: <NAME_OF_NODE>
# Automation turning on the blue status LED once T1 is booted up
on_boot:
priority: -10
then:
- light.turn_on: blue_led_light
esp8266:
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_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 T1 UK 3 Gang Touchpad 1"
on_press:
- switch.toggle: relay_1
- platform: gpio
pin:
number: GPIO9
mode:
input: true
pullup: true
inverted: true
name: "Sonoff T1 UK 3 Gang Touchpad 2"
on_press:
- switch.toggle: relay_2
- platform: gpio
pin:
number: GPIO10
mode:
input: true
pullup: true
inverted: true
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
inverted: true
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