Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://esphome.io/devices/sonoff.html#sonoff-th10-th16
- # https://templates.blakadder.com/sonoff_TH.html
- # Button: GPIO0, Inverted
- # Relay, Red LED: GPIO12
- # Blue LED: GPIO13, Inverted
- # UART Tx : GPIO1
- # UART Rx : GPIO3
- # Sensor 1 : GPIO4
- # Sensor 2 : GPIO14
- # EXP-LOG : GPIO2
- # https://esphome.io/guides/configuration-types.html#substitutions
- substitutions:
- device_name: sonoff_th10_hot_recirc_pump
- device_comment: "Hot Water Recirculation Pump Controller"
- # https://esphome.io/components/esphome.html
- esphome:
- name: ${device_name}
- comment: ${device_comment}
- platform: ESP8266
- board: esp8285
- # arduino_version: 2.4.2
- # https://esphome.io/guides/configuration-types.html#packages
- packages:
- common: !include templates/common.yaml
- status_sensor: !include templates/status_sensor.yaml
- version_sensor: !include templates/version_sensor.yaml
- wifi_sensor: !include templates/wifi_sensor.yaml
- uptime_sensor: !include templates/uptime_sensor.yaml
- restart_switch: !include templates/restart_switch.yaml
- web_server: !include templates/web_server.yaml
- # https://esphome.io/components/binary_sensor/index.html
- binary_sensor:
- # https://esphome.io/components/binary_sensor/gpio.html
- - platform: gpio
- name: ${device_name}_button
- device_class: power
- pin:
- number: GPIO0
- inverted: true
- on_press:
- - switch.toggle: relay
- # https://esphome.io/components/switch/index.html
- switch:
- # https://esphome.io/components/switch/gpio.html
- - platform: gpio
- name: ${device_name}_relay
- id: relay
- pin: GPIO12
- # https://esphome.io/components/status_led.html
- status_led:
- pin:
- number: GPIO13
- # https://esphome.io/components/sensor/dallas.html
- dallas:
- - pin: GPIO14
- update_interval: 5s
- # https://esphome.io/components/sensor/index.html
- sensor:
- # https://esphome.io/components/sensor/dallas.html
- - platform: dallas
- address: 0xD20301A27931AC28
- name: ${device_name}_recirc_temp
- id: recirc_temp
- # https://esphome.io/components/climate/index.html
- climate:
- # https://esphome.io/components/climate/bang_bang.html
- - platform: bang_bang
- name: ${device_name}_bangbang
- sensor: recirc_temp
- default_target_temperature_low: 30 °C
- default_target_temperature_high: 40 °C
- heat_action:
- - switch.turn_on: relay
- idle_action:
- - switch.turn_off: relay
- visual:
- min_temperature: 20 °C
- max_temperature: 50 °C
- temperature_step: 1 °C
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement