-
Notifications
You must be signed in to change notification settings - Fork 0
/
lights.yaml
155 lines (145 loc) · 3.16 KB
/
lights.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
esphome:
name: lights
platform: ESP8266
board: esp01
arduino_version: espressif8266@2.6.2
wifi:
ssid: !secret wifi_name
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lights Fallback Hotspot"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
time:
- platform: homeassistant
id: homeassistant_time
i2c:
sda: 2
scl: 0
scan: True
mcp23017:
- id: "mcp23017_hub"
# address: 0x20
switch:
- platform: gpio
name: "Light #1"
pin:
mcp23017: mcp23017_hub
number: 8
# Top Left
mode: OUTPUT
inverted: true
- platform: gpio
name: "Light #2"
pin:
mcp23017: mcp23017_hub
number: 9
mode: OUTPUT
inverted: true
- platform: gpio
name: "Light #3"
pin:
mcp23017: mcp23017_hub
number: 10
mode: OUTPUT
inverted: true
- platform: gpio
name: "Light #4"
pin:
mcp23017: mcp23017_hub
number: 11
mode: OUTPUT
inverted: true
- platform: gpio
name: "Light #5"
pin:
mcp23017: mcp23017_hub
number: 12
mode: OUTPUT
inverted: true
- platform: gpio
name: "Light #6"
pin:
mcp23017: mcp23017_hub
number: 13
mode: OUTPUT
inverted: true
- platform: gpio
name: "Light #7"
pin:
mcp23017: mcp23017_hub
number: 14
mode: OUTPUT
inverted: true
- platform: gpio
name: "Light #8"
pin:
mcp23017: mcp23017_hub
number: 15
mode: OUTPUT
inverted: true
binary_sensor:
- platform: gpio
name: "PIR #1"
device_class: motion
pin:
mcp23017: mcp23017_hub
# Top Right
number: 7
# mode: INPUT
- platform: gpio
name: "PIR #2"
device_class: motion
pin:
mcp23017: mcp23017_hub
number: 6
# mode: INPUT
- platform: gpio
name: "PIR #3"
device_class: motion
pin:
mcp23017: mcp23017_hub
number: 5
# mode: INPUT
- platform: gpio
name: "PIR #4"
device_class: motion
pin:
mcp23017: mcp23017_hub
number: 4
# mode: INPUT
- platform: gpio
name: "PIR #5"
device_class: motion
pin:
mcp23017: mcp23017_hub
number: 3
# mode: INPUT
- platform: gpio
name: "PIR #6"
device_class: motion
pin:
mcp23017: mcp23017_hub
number: 2
# mode: INPUT
- platform: gpio
name: "PIR #7"
device_class: motion
pin:
mcp23017: mcp23017_hub
number: 1
# mode: INPUT
- platform: gpio
name: "PIR #8"
device_class: motion
pin:
mcp23017: mcp23017_hub
number: 0
# mode: INPUT
# Reports if this device is Connected or not
- platform: status
name: Lights Status