-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathventilation-controller.yaml
executable file
·132 lines (112 loc) · 3.55 KB
/
ventilation-controller.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
# Insert your SSID and Your PWD after inital setup
wifi:
# networks:
# - ssid: 'REPLACEME' # Enter your WiFi SSID here. Example: `ssid: 'your_network_name'`
# password: 'REPLACEME' # Enter your wifi password here. Example: `password: 'abcde123456'`
ap:
ssid: ${name}
#####################################################################
###################### HOW TO CONNECT ###############################
#####################################################################
# Relay 1 connected to 'Betriebsart' pin
# Relay 2 connected to 'Stufe 0/1' pin
# Relay 3 connected to 'Stufe 2' pin
# Relay 4 connected to 'Stufe 3' pin
# And all COM terminals are connected to the 'Schalter' pin
#####################################################################
# Enable the captive portal for inital WiFi setup
captive_portal:
dashboard_import:
package_import_url: github://yllwfsh/ventilation-controller/ventilation-controller.yaml
improv_serial:
substitutions:
name: ventilation-controller
friendly_name: VentilationController
esphome:
name: $name
friendly_name: $friendly_name
name_add_mac_suffix: true
project:
name: yllwfsh.ventilation-controller
version: "1.1"
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
- platform: esphome
web_server:
port: 80
#####################################################################
fan:
- platform: speed
output: outputsplit
name: $friendly_name
speed_count: 4
oscillation_output: betriebsart
restore_mode: RESTORE_DEFAULT_OFF
output:
- platform: template
id: outputsplit
type: float
write_action: # Filter based on setting 0/25/50/75/100% :
- if:
condition:
lambda: return (state == 0); # 0%
then:
- output.turn_off: stufe01 # All off
- output.turn_off: stufe2
- output.turn_off: stufe3
- if:
condition:
lambda: return (state == .25); # 25%
then:
- output.turn_off: stufe01 # Only 0/1 on (Stufe 1)
- output.turn_off: stufe2
- output.turn_off: stufe3
- output.turn_on: stufe01
- if:
condition:
lambda: return (state == .50); # 50%
then:
- output.turn_off: stufe01 # 0/1 and 2 on (Stufe 2)
- output.turn_off: stufe2
- output.turn_off: stufe3
- output.turn_on: stufe01
- output.turn_on: stufe2
- if:
condition:
lambda: return (state == .75); # 75%
then:
- output.turn_off: stufe01 # 0/1 and 3 on (Stufe 3)
- output.turn_off: stufe2
- output.turn_off: stufe3
- output.turn_on: stufe01
- output.turn_on: stufe3
- if:
condition:
lambda: return (state == 1); # 100%
then:
- output.turn_off: stufe01 # All on (Stufe 5 - Hurricane mode)
- output.turn_off: stufe2
- output.turn_off: stufe3
- output.turn_on: stufe01
- output.turn_on: stufe2
- output.turn_on: stufe3
- platform: gpio
pin: 32
id: betriebsart # Relay 1 connected to 'Betriebsart' pin
- platform: gpio
pin: 33
id: stufe01 # Relay 2 connected to '0/1' pin
- platform: gpio
pin: 25
id: stufe2 # Relay 3 connected to '2' pin
- platform: gpio
pin: 26
id: stufe3 # Relay 4 connected to '3' pin
# And all COM terminals are connected to the 'Schalter' pin