-
Notifications
You must be signed in to change notification settings - Fork 1
/
mcu-patio.yaml
204 lines (188 loc) · 4.16 KB
/
mcu-patio.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
substitutions:
device: patio
name: Patio
comment: "Outside, Patio: On the back yard"
esphome:
name: mcu-${device}
comment: ${comment}
on_boot:
# - priority: 600.0
# then:
# - light.turn_on: light_1
# - light.turn_on: light_2
# - light.turn_on: light_3
# - light.turn_on: light_4
priority: -100.0
then:
- if:
condition:
api.connected:
then:
- light.turn_off: light_1
- light.turn_off: light_2
- light.turn_off: light_3
- light.turn_off: light_4
esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.1.2
platform_version: 6.5.0
packages:
common: !include common/common.yaml
# PINOUTS: M5ATOM+Atom Hub Switch
# IR G12
# NEO G27 1x
# BUTTON G39
# I2C0 SDA G26 - white
# I2C0 SCL G32
# I2C1 SDA G25 - red
# I2C1 SCL G21
# UART0 RX G3
# UART0 TX G1
# RS485 Rx G33
# RS485 Tx G23
# Relay1 G22
# Relay2 G19
time:
- platform: homeassistant
id: ha_time
timezone: Europe/Bratislava
i2c:
# - id: i2c0
# sda: 26
# scl: 32
# scan: true #false
# - id: i2c1
sda: 25
scl: 21
scan: true #false
pca9685:
id: 'pca9685_hub1'
frequency: 1000
address: 0x40
# modbus:
# uart_id: uart1
# uart:
# - id: uart1
# rx_pin: 33
# tx_pin: 32
# baud_rate: 9600
# stop_bits: 2
binary_sensor:
- platform: gpio
name: "${name} Status Button"
filters:
- invert:
pin: 39
light:
# - platform: esp32_rmt_led_strip
# name: "${name} Status Light"
# id: neo
# rgb_order: GRB
# pin: 27
# num_leds: 1
# rmt_channel: 0
# chipset: ws2812
# restore_mode: ALWAYS_OFF
- platform: cwww
name: "${name} Light 1"
id: light_1
default_transition_length: 200ms
restore_mode: ALWAYS_ON
cold_white: pwm_cw_1
warm_white: pwm_ww_1
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
- platform: cwww
name: "${name} Light 2"
id: light_2
default_transition_length: 200ms
restore_mode: ALWAYS_ON
cold_white: pwm_cw_2
warm_white: pwm_ww_2
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
- platform: cwww
name: "${name} Light 3"
id: light_3
default_transition_length: 200ms
restore_mode: ALWAYS_ON
cold_white: pwm_ww_3
warm_white: pwm_cw_3
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
- platform: cwww
name: "${name} Light 4"
id: light_4
default_transition_length: 200ms
restore_mode: ALWAYS_ON
cold_white: pwm_cw_4
warm_white: pwm_ww_4
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
output:
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_cw_1'
channel: 0
#min_power: 0.05
zero_means_zero: true
power_supply: power_supply1
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_ww_1'
channel: 1
#min_power: 0.05
zero_means_zero: true
power_supply: power_supply1
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_cw_2'
channel: 2
#min_power: 0.05
zero_means_zero: true
power_supply: power_supply1
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_ww_2'
channel: 3
#min_power: 0.07
zero_means_zero: true
power_supply: power_supply1
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_cw_3'
channel: 4
#min_power: 0.07
zero_means_zero: true
power_supply: power_supply1
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_ww_3'
channel: 5
#min_power: 0.08
zero_means_zero: true
power_supply: power_supply1
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_cw_4'
channel: 6
#min_power: 0.08
zero_means_zero: true
power_supply: power_supply1
- platform: pca9685
pca9685_id: 'pca9685_hub1'
id: 'pwm_ww_4'
channel: 7
#min_power: 0.08
zero_means_zero: true
power_supply: power_supply1
power_supply:
- id: 'power_supply1'
pin: 22
switch:
- platform: gpio
name: "${name} Relay"
id: relay_2
pin: 19