generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
sonoff-tx-t3.yaml
90 lines (88 loc) · 1.76 KB
/
sonoff-tx-t3.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
87
88
89
90
substitutions:
name: sonoff-tx-t3
friendly_name: Sonoff TX T3
esphome:
name: $name
comment: Sonoff TX T3
name_add_mac_suffix: true
# This will allow for (future) project identification,
# configuration and updates.
project:
name: cpyarger.sonoff-tx-t3
version: "1.0"
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
# This should point to the public location of this yaml file.
dashboard_import:
package_import_url: github:https://cpyarger/esphome-templates/sonoff-tx-t3.yaml@main
wifi:
# Set up a wifi access point
ap:
password: "12345678"
captive_portal:
# Sets up the improv via serial client for Wi-Fi provisioning
improv_serial:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
id: button_1
on_press:
then:
- light.toggle: light_1
- platform: gpio
pin:
number: GPIO9
mode: INPUT_PULLUP
inverted: True
id: button_2
on_press:
then:
- light.toggle: light_2
- platform: gpio
pin:
number: GPIO10
mode: INPUT_PULLUP
inverted: True
id: button_3
on_press:
then:
- light.toggle: light_3
- platform: status
name: "$friendly_name Status"
output:
- platform: gpio
pin: GPIO12
id: relay_1
- platform: gpio
pin: GPIO5
id: relay_2
- platform: gpio
pin: GPIO4
id: relay_3
light:
- platform: binary
name: "$friendly_name Light 1"
id: light_1
output: relay_1
- platform: binary
name: "$friendly_name Light 2"
id: light_2
output: relay_2
- platform: binary
name: "$friendly_name Light 3"
id: light_3
output: relay_3
status_led:
pin:
number: GPIO13
inverted: yes