-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtent-node.yaml
More file actions
169 lines (155 loc) · 3.62 KB
/
tent-node.yaml
File metadata and controls
169 lines (155 loc) · 3.62 KB
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
esphome:
name: tent-node
friendly_name: tent-node
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "5940afe3c41c9b99d94bcb33a9158d40"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Tent-Node Fallback Hotspot"
password: "gA2pNpwgUyN8"
i2c:
sda: GPIO21 # D2 # GPIO21 for ESP32
scl: GPIO22 # D1 # GPIO22 For ESP32
# Example configuration entry
sensor:
- platform: aht10 #dht12 #am2320 #
temperature:
name: "dht20 Temperature"
id: temperature
humidity:
name: "dht20 Humidity"
id: humidity
on_value_range:
- above: 70
then:
- climate.control:
id: template_climate
mode: DRY
- below: 70
then:
- climate.control:
id: template_climate
mode: AUTO
- platform: pid
name: "PID Climate Result"
type: RESULT
- platform: pid
name: "Fan Speed"
type: COOL
id: pid_cool
icon: "mdi:fan"
font:
# gfonts://family[@weight]
- file: "gfonts://Roboto"
id: roboto
size: 12
number:
- platform: template
name: Tent Node Max Temp
id: max_temp
initial_value: 29
min_value: 21
max_value: 31
step: 0.5
optimistic: true
- platform: template
name: Tent Node Min Temp
id: min_temp
initial_value: 21
min_value: 19
max_value: 29
step: 0.5
optimistic: true
- platform: template
name: Tent Node Max Humidity
id: max_humidity
initial_value: 65
min_value: 60
max_value: 90
step: 1
optimistic: true
graph:
# Show bare-minimum auto-ranged graph
- id: single_temperature_graph
sensor: temperature
duration: 1h
width: 108
height: 44
- id: single_humidity_graph
sensor: humidity
duration: 1h
width: 108
height: 44
display:
- platform: ssd1327_i2c
model: "SSD1327 128x128"
address: 0x3C
lambda: |-
// Draw the graph at position [x=10,y=20]
it.printf(2, 0, id(roboto), "temp : %.1f", id(temperature).state);
it.graph(10, 14, id(single_temperature_graph));
it.printf(2, 62, id(roboto), "hum : %.1f, fan : %.0f", id(humidity).state, id(pid_cool).state);
it.graph(10, 76, id(single_humidity_graph));
output:
- platform: ledc
pin: GPIO2
id: fanoutput
frequency: 4000 Hz
# min_power: 0.1
fan:
- platform: speed
output: fanoutput
name: "Tent Fan PWM"
id: fanid
climate:
- platform: thermostat
id: template_climate
name: "Tent Climate Controller"
sensor: temperature
min_cooling_off_time: 300s
min_cooling_run_time: 300s
min_idle_time: 30s
cool_action:
- climate.control:
id: pid_climate
mode: AUTO
target_temperature_low: 26°C
target_temperature: 29°C
target_temperature_high: 30°C
idle_action:
- climate.control:
id: pid_climate
mode: COOL
target_temperature: 23°C
target_temperature_high: 25°C
dry_action:
- climate.control:
id: pid_climate
mode: COOL
target_temperature: 20°C
target_temperature_high: 22°C
default_preset: Home
preset:
- name: Home
default_target_temperature_high: 29°C
- platform: pid
id: pid_climate
name: "PID Climate Controller"
sensor: temperature
default_target_temperature: 29°C
cool_output: fanoutput
control_parameters:
kp: 0.25000
ki: 0.00100
kd: 0.15000