-
Notifications
You must be signed in to change notification settings - Fork 13
/
example_ftc532.yml
116 lines (103 loc) · 2.17 KB
/
example_ftc532.yml
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
# Teekar Curtain Switch
# GPIO inv? Copomponent
# 0 yes LED Up Blue
# 1 yes LED Down Blue
# 2 yes LED Pause Red
# 3 ???
# 4 yes LED Up Green
# 5 Relay Down
# 12 ???
# 13 yes LED Pause Green
# 14 Buttons (with some digital protocol)
# https://github.com/arendst/Tasmota/discussions/10185
# 15 Relay Up
# 16 yes LED Pause Blue
esphome:
name: shutter
platform: ESP8266
board: esp01_1m
on_boot:
then:
- output.turn_off: pause_green
external_components:
- source: github://jplitza/esphome_components
ota:
# recommended because flashing fails when using the ftc532 component, and this
# way you don't have to try as many times
num_attempts: 3
ftc532:
pin: GPIO14
binary_sensor:
- id: down_button
platform: ftc532
channel: 0
on_press:
then:
- cover.close: cover1
- id: stop_button
platform: ftc532
channel: 1
on_press:
then:
- cover.stop: cover1
- id: up_button
platform: ftc532
channel: 2
on_press:
then:
- cover.open: cover1
output:
- platform: gpio
pin: GPIO0
inverted: True
id: up_blue
- platform: gpio
pin: GPIO1
inverted: True
id: down_blue
- platform: gpio
pin: GPIO2
inverted: True
id: pause_red
- platform: gpio
pin: GPIO4
inverted: True
id: up_green
- platform: gpio
pin: GPIO13
inverted: True
id: pause_green
status_led:
id: pause_blue
pin:
number: GPIO16
inverted: True
switch:
- platform: gpio
pin: GPIO15
id: down
restore_mode: ALWAYS_OFF
interlock: [up]
interlock_wait_time: 0.5s
- platform: gpio
pin: GPIO5
id: up
restore_mode: ALWAYS_OFF
interlock: [down]
interlock_wait_time: 0.5s
cover:
- platform: time_based
name: 'Curtain'
id: cover1
device_class: blind
open_action:
- switch.turn_off: down
- switch.turn_on: up
open_duration: 32s
close_action:
- switch.turn_off: up
- switch.turn_on: down
close_duration: 30s
stop_action:
- switch.turn_off: up
- switch.turn_off: down