· 3 years ago · Aug 18, 2022, 08:40 PM
1substitutions:
2 device_name: "Konyha"
3
4esphome:
5 name: kitchen
6 comment: Konyha ESP32 controller
7 project:
8 name: "Peti.Konyha szenzor"
9 version: "0.2.0"
10
11esp32:
12 board: esp32dev
13 framework:
14 type: arduino
15
16web_server:
17 port: 80
18
19# Enable logging
20logger:
21 level: ERROR
22
23# Enable Home Assistant API
24api:
25 encryption:
26 key: "xxxxxxxxxxxxxxxxxxxxx"
27
28ota:
29 password: "xxxxxxxxxxxxxxxxxxxxx"
30
31wifi:
32 ssid: !secret wifi_ssid
33 password: !secret wifi_password
34
35 manual_ip:
36 # Set this to the IP of the ESP
37 static_ip: xxx.xxx.xxx.xxx
38 # Set this to the IP address of the router. Often ends with .1
39 gateway: xxx.xxx.xxx.xxx
40 # The subnet of the network. 255.255.255.0 works for most home networks.
41 subnet: 255.255.255.0
42
43 # Enable fallback hotspot (captive portal) in case wifi connection fails
44 ap:
45 ssid: "Kitchen Fallback Hotspot"
46 password: !secret wifi_ap_password
47
48 #use_address: xxx.xxx.xxx.xxx
49
50time:
51 - platform: sntp
52 timezone: "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00" # Europe/Budapest -> https://sites.google.com/a/usapiens.com/opnode/time-zones
53 id: my_time
54
55captive_portal:
56
57text_sensor:
58 - platform: wifi_info
59 ip_address:
60 name: "IP Address"
61 ssid:
62 name: "Connected SSID"
63 bssid:
64 name: "Connected BSSID"
65 mac_address:
66 name: "Mac Wifi Address"
67 scan_results:
68 name: "Latest Scan Results"
69
70button:
71 - platform: restart
72 name: "Konyha Restart"
73
74 - platform: template
75 name: "Teszt gomb"
76 id: my_button
77 # Optional variables:
78 icon: "mdi:emoticon-outline"
79 on_press:
80 - logger.log: "Teszt Button pressed"
81
82binary_sensor:
83 - platform: gpio
84 pin: GPIO21
85 name: "Toggle Light1"
86 internal: true
87 filters:
88 - delayed_on: 10ms
89 - delayed_off: 10ms
90 on_click:
91 min_length: 50ms
92 max_length: 350ms
93 then:
94 - light.toggle: light1
95 - logger.log: "Clicked"
96
97sensor:
98 - platform: uptime
99 name: ${device_name} Uptime
100 filters:
101 - lambda: return x / 3600;
102 unit_of_measurement: "hours"
103 accuracy_decimals: 2
104 update_interval: 300s
105
106 - platform: wifi_signal
107 id: wifi_rssi
108 name: "RSSI"
109 update_interval: 120s
110
111 # hőmérő: konyha bent, DHT11
112 - platform: dht
113 pin: GPIO33
114 temperature:
115 id: kitchen_temperature
116 name: "Kitchen Temperature"
117 filters:
118 - offset: -1.5
119 humidity:
120 id: kitchen_humidity
121 name: "Kitchen Humidity"
122 model: DHT22
123 update_interval: 60s
124
125 # hőmérő: bejárat kint, DHT22
126 - platform: dht
127 pin: GPIO32
128 temperature:
129 id: outdoor_temperature
130 name: "Outdoor Temperature"
131 filters:
132 - offset: -1.5
133 humidity:
134 id: outdoor_humidity
135 name: "Outdoor Humidity"
136 model: DHT22
137 update_interval: 60s
138
139
140
141
142 # Fogyasztásmérő: Boiler (bojler)
143 - platform: pulse_meter
144 id: meter_power_boiler
145 state_class: total_increasing
146 device_class: power
147 pin: GPIO35
148 unit_of_measurement: 'kW'
149 name: 'Boiler Energy Usage'
150 internal_filter: 100ms
151 accuracy_decimals: 3
152 timeout: 60s
153 filters:
154 - multiply: 0.06
155 - platform: total_daily_energy
156 name: "Boiler Energy Total Daily"
157 accuracy_decimals: 2
158 power_id: meter_power_boiler
159 unit_of_measurement: "kWh"
160 device_class: energy
161 min_save_interval: 120s
162
163
164 # Fogyasztásmérő: AC (klíma)
165 - platform: pulse_meter
166 id: meter_power_ac
167 state_class: total_increasing
168 device_class: power
169 pin: GPIO39
170 unit_of_measurement: 'kW'
171 name: 'AC Energy Usage'
172 internal_filter: 100ms
173 accuracy_decimals: 3
174 timeout: 60s
175 filters:
176 - multiply: 0.06
177 - platform: total_daily_energy
178 name: "AC Energy Total Daily"
179 accuracy_decimals: 2
180 power_id: meter_power_ac
181 unit_of_measurement: "kWh"
182 device_class: energy
183 min_save_interval: 120s
184
185
186
187 # Fogyasztásmérő: Stove (tűzhely)
188 - platform: pulse_meter
189 id: meter_power_stove
190 state_class: total_increasing
191 device_class: power
192 pin: GPIO34
193 unit_of_measurement: 'kW'
194 name: 'Stove Energy Usage'
195 internal_filter: 100ms
196 accuracy_decimals: 3
197 timeout: 60s
198 filters:
199 - multiply: 0.06
200 - platform: total_daily_energy
201 name: "Stove Energy Total Daily"
202 accuracy_decimals: 2
203 power_id: meter_power_stove
204 unit_of_measurement: "kWh"
205 device_class: energy
206 min_save_interval: 120s
207
208 # Fogyasztásmérő: Incoming (teljes bejövő)
209 - platform: pulse_meter
210 id: meter_power_incoming
211 state_class: total_increasing
212 device_class: power
213 pin: GPIO36
214 unit_of_measurement: 'kW'
215 name: 'Incoming Energy Usage'
216 internal_filter: 100ms
217 accuracy_decimals: 3
218 timeout: 60s
219 filters:
220 - multiply: 0.06
221 - platform: total_daily_energy
222 name: "Incoming Energy Total Daily"
223 accuracy_decimals: 2
224 power_id: meter_power_incoming
225 unit_of_measurement: "kWh"
226 device_class: energy
227 min_save_interval: 120s
228
229# Example configuration entry
230output:
231 - platform: ledc
232 pin: GPIO25
233 id: gpio_25
234 frequency: "2441Hz"
235
236 - platform: ledc
237 pin: GPIO26
238 id: gpio_26
239 frequency: "2441Hz"
240
241# Example usage in a light
242light:
243 - platform: monochromatic
244 output: gpio_25
245 name: "Kitchen Light1"
246 id: light1
247 effects:
248 - pulse:
249 - pulse:
250 name: "Fast Pulse"
251 transition_length: 0.5s
252 update_interval: 0.5s
253 - pulse:
254 name: "Slow Pulse"
255 # transition_length: 1s # defaults to 1s
256 update_interval: 2s
257 - flicker:
258 - random:
259 - strobe:
260
261 - platform: monochromatic
262 output: gpio_26
263 name: "Kitchen Light2"
264 id: light2
265 effects:
266 - pulse:
267 - pulse:
268 name: "Fast Pulse"
269 transition_length: 0.5s
270 update_interval: 0.5s
271 - pulse:
272 name: "Slow Pulse"
273 # transition_length: 1s # defaults to 1s
274 update_interval: 2s
275 - flicker:
276 - random:
277 - strobe:
278