Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: sonoff_dualr2_03
- platform: ESP8266
- board: esp01_1m
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- ota:
- password: "1ea575456fb1d95ecd2cb71f67fb65c1"
- wifi:
- ssid: !secret iot_ssid
- password: !secret iot_pass
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Nocemcu Fallback Hotspot"
- password: "gQSbSS5bC4HZ"
- captive_portal:
- spi:
- miso_pin: GPIO01
- clk_pin: GPIO03
- mqtt:
- broker: a3160c7746asdad43ac973eebe480b11841.s1.eu.hivemq.cloud
- username: mqttuser
- password: mqttpass
- birth_message:
- topic: temperature/smoke
- payload: online
- binary_sensor:
- - platform: gpio
- pin:
- number: GPIO10
- mode: INPUT_PULLUP
- inverted: True
- name: "sonoff_dualr2_03_button"
- #toggle both relays on push
- on_press:
- - switch.toggle: relay
- - switch.toggle: relay2
- - platform: gpio
- pin:
- number: GPIO00
- mode: INPUT_PULLUP
- inverted: True
- name: "sonoff_dualr2_03_button0"
- #toggle only relay1
- on_press:
- - switch.toggle: relay
- - platform: gpio
- pin:
- number: GPIO09
- mode: INPUT_PULLUP
- inverted: True
- name: "sonoff_dualr2_03_button1"
- #toggle only relay2
- on_press:
- - switch.toggle: relay2
- switch:
- - platform: gpio
- name: sonoff_dualr2_03_relay1
- pin: GPIO12
- id: relay
- - platform: gpio
- name: sonoff_dualr2_03_relay2
- pin: GPIO05
- id: relay2
- - platform: shutdown
- name: "sonoff_dualr2_03_shutdown"
- - platform: restart
- name: "sonoff_dualr2_03_restart"
- status_led:
- pin:
- number: GPIO13
- inverted: yes
- sensor:
- - platform: wifi_signal
- #name: "${dev_name}_wifi_signal"
- name: "sonoff_dualr2_03_wifi_signal"
- update_interval: 30s
- - platform: uptime
- name: "sonoff_dualr2_03_uptime"
- update_interval: 120s
- - platform: max6675
- name: "Temperature Chimney"
- cs_pin: GPIO00
- update_interval: 60s
- on_value_range:
- - above: 96
- then:
- - switch.turn_on: relay
- - below: 30
- then:
- - switch.turn_off: relay
- text_sensor:
- - platform: version
- name: "sonoff_dualr2_03_version"
Advertisement
Add Comment
Please, Sign In to add comment