@@ -234,244 +234,3 @@ text_sensor:
234234 name : " ${friendly_name} IP Address"
235235 disabled_by_default : true
236236` ` `
237-
238- Here is an alternative configuration, set up to control a geyser, with an
239- ATTiny85 acting as a DS18B20 1-wire probe, using OneWireHub. The intent is
240- to use excess solar power to heat the geyser in Boost mode, revert to Eco
241- overnight, and default to Home in case there is no external controller.
242-
243- ` ` ` yaml
244- substitutions :
245- name : " geyser"
246- friendly_name : " Geyser Thermostat"
247- project_name : " thermostats"
248- project_version : " 1.0"
249-
250- packages :
251- # contains basic setup, WiFi, etc
252- common : !include .common.yaml
253-
254- esphome :
255- name : " ${name}"
256- friendly_name : " ${friendly_name}"
257- on_boot :
258- - priority : 90
259- then :
260- # supply the external sensor with 3v power by pulling this GPIO high
261- - output.turn_on : sensor_power
262- # make sure the relay is in a known state at startup
263- - switch.turn_off : main_relay
264- # Default to running the geyser in Home mode
265- - climate.control :
266- id : geyser_climate
267- preset : " Home"
268-
269- esp32 :
270- variant : esp32
271-
272- logger :
273- # It's in the ceiling, nobody is listening to the UART
274- baud_rate : 0
275- level : DEBUG
276-
277- web_server :
278- port : 80
279-
280- captive_portal :
281-
282- binary_sensor :
283- # single main button that also puts device into flash mode when held on boot
284- # For someone in the ceiling, this can be used to turn the climate control
285- # into OFF or HEAT modes. It does NOT directly control the relay.
286- - platform : gpio
287- pin :
288- number : GPIO0
289- mode : INPUT_PULLUP
290- inverted : True
291- id : button0
292- filters :
293- - delayed_on_off : 50ms
294- on_press :
295- then :
296- - if :
297- condition :
298- lambda : |-
299- return id(geyser_climate).mode != CLIMATE_MODE_OFF;
300- then :
301- - logger.log : " Button deactivates climate control"
302- - climate.control :
303- id : geyser_climate
304- mode : " OFF"
305- else :
306- - logger.log : " Button activates climate control"
307- - climate.control :
308- id : geyser_climate
309- mode : " HEAT"
310-
311- switch :
312- # template switch to represent the main relay
313- # this is synchronised with the RED LED
314- # Note: this is controlled by the climate entity, and is not exposed
315- # for direct manipulation, otherwise it could be left on permanently
316- - platform : template
317- id : main_relay
318- turn_on_action :
319- - button.press : main_relay_on
320- - light.turn_on : onoff_led
321- turn_off_action :
322- - button.press : main_relay_off
323- - light.turn_off : onoff_led
324- assumed_state : True
325- optimistic : True
326- restore_state : True
327-
328- output :
329- # Ideally, these two relay GPIOs should be interlocked to prevent
330- # simultaneous operation. ESPHome currently does not support
331- # interlocks at an output: level, or even at a button: level
332- # BE CAREFUL!
333- - platform : gpio
334- id : main_relay_on_output
335- pin :
336- number : GPIO19
337-
338- - platform : gpio
339- id : main_relay_off_output
340- pin :
341- number : GPIO22
342-
343- - platform : ledc
344- id : red_led_output
345- pin :
346- number : GPIO16
347- inverted : true
348-
349- - platform : ledc
350- id : green_led_output
351- pin :
352- number : GPIO13
353- inverted : true
354-
355- # This is needed to power the external sensor.
356- # It receives 3v3 from this pin, which is pulled up on boot.
357- - platform : gpio
358- pin : GPIO27
359- id : sensor_power
360-
361- button :
362- # See note above about interlocks!
363- - platform : output
364- id : main_relay_on
365- output : main_relay_on_output
366- duration : 100ms
367-
368- - platform : output
369- id : main_relay_off
370- output : main_relay_off_output
371- duration : 100ms
372-
373- # The middle (blue) LED is used as wifi status indicator.
374- status_led :
375- pin :
376- number : GPIO15
377- inverted : true
378-
379- light :
380- # Leftmost (red) LED that's used to indicate the relay being on/off
381- - platform : binary
382- id : onoff_led
383- output : red_led_output
384- internal : true
385-
386- # Rightmost (green) LED used to indicate climate control being active
387- - platform : binary
388- id : auto_led
389- output : green_led_output
390- internal : true
391-
392- sensor :
393- # Geyser temperature
394- # Has some failsafes to disable climate control if the temperature
395- # being reported is unreasonable. Below 10C suggests that the ATTiny85
396- # is either not connected to the thermistor, or is otherwise reporting
397- # incorrect values, and should be investigated.
398- #
399- # NOTE: This can be overridden, but care should be taken when doing so
400- # because these only apply when the temperature ENTERS these ranges
401- # If it REMAINS in the range, and climate is turned on manually, these
402- # failsafes will not apply!
403- - platform : dallas_temp
404- address : 0x1e11223344550028
405- id : temp
406- name : " Temperature"
407- on_value_range :
408- - below : 10.0
409- then :
410- - logger.log : " Temperature too low, disabling climate!"
411- - climate.control :
412- id : geyser_climate
413- mode : " OFF"
414- - above : 70.0
415- then :
416- - logger.log : " Temperature too high, disabling climate!"
417- - climate.control :
418- id : geyser_climate
419- mode : " OFF"
420-
421- # The THR320 appears to run quite hot, let's just keep an eye on it
422- - platform : internal_temperature
423- name : " Internal Temperature"
424-
425- climate :
426- - platform : thermostat
427- id : geyser_climate
428- name : " Climate"
429- sensor : temp
430- visual :
431- min_temperature : 45C
432- max_temperature : 70C
433- temperature_step :
434- target_temperature : 1
435- current_temperature : 1
436- default_preset : Home
437- preset :
438- - name : Home
439- default_target_temperature_low : 55C
440- mode : heat
441- - name : Boost
442- default_target_temperature_low : 65C
443- mode : heat
444- - name : Eco
445- default_target_temperature_low : 45C
446- mode : heat
447- min_heating_off_time : 0s
448- min_heating_run_time : 60s
449- min_idle_time : 30s
450- heat_action :
451- - switch.turn_on : main_relay
452- idle_action :
453- - switch.turn_off : main_relay
454- heat_deadband : 2 # how many degrees can we go under the temp before starting to heat
455- heat_overrun : 0.5 # how many degrees can we go over the temp before stopping
456- off_mode :
457- - switch.turn_off : main_relay
458- on_state :
459- - if :
460- condition :
461- lambda : |-
462- return id(geyser_climate).mode == CLIMATE_MODE_OFF;
463- then :
464- - logger.log : " Climate control OFF"
465- - light.turn_off : auto_led
466- - if :
467- condition :
468- lambda : |-
469- return id(geyser_climate).mode == CLIMATE_MODE_HEAT;
470- then :
471- - logger.log : " Climate control ON"
472- - light.turn_on : auto_led
473-
474- one_wire :
475- pin : GPIO25
476- update_interval : 10s
477- ` ` `
0 commit comments