-
Notifications
You must be signed in to change notification settings - Fork 0
/
3_smart_buttons.yaml
91 lines (75 loc) · 1.35 KB
/
3_smart_buttons.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
91
substitutions:
name: 3_smart_buttons
friendly_name: "3 Smart Buttons"
esphome:
name: $name
platform: ESP8266
board: d1_mini
on_boot:
- light.turn_on:
id: led_1
- light.turn_on:
id: led_2
- light.turn_on:
id: led_3
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key:
ota:
password:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid:
password:
captive_portal:
binary_sensor:
- platform: gpio
pin:
number: D1
mode: INPUT_PULLUP
name: "Button 1"
# device_class: opening
- platform: gpio
pin:
number: D5
mode: INPUT_PULLUP
name: "Button 2"
# device_class: opening
- platform: gpio
pin:
number: D6
mode: INPUT_PULLUP
name: "Button 3"
# device_class: opening
light:
- platform: binary
name: "LED 1"
output: light_output1
id: led_1
- platform: binary
name: "LED 2"
output: light_output2
id: led_2
- platform: binary
name: "LED 3"
output: light_output3
id: led_3
output:
- id: light_output1
platform: gpio
pin:
number: D2
- id: light_output2
platform: gpio
pin:
number: D7
- id: light_output3
platform: gpio
pin:
number: D0