--- # Hardware: Sonoff Basic R2 # Pinout: # GPIO0 BUTTON -> Button (binary_sensor gpio) (inverted) # GPIO1 TX PIN # GPIO3 RX PIN # GPIO12 RELAY -> Relay (switch gpio) # GPIO13 LED1 -> led (output gpio) substitutions: device: waterproof-socket name: Waterproof Socket area: Basement comment: Hardened remote controlled socket esphome: name: mcu-${device} friendly_name: ${name} area: ${area} comment: ${comment} esp8266: board: esp01_1m packages: common: !include common/common_esp8266.yaml mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml binary_sensor: - platform: gpio pin: number: GPIO0 mode: INPUT inverted: True name: Button on_press: - switch.toggle: relay output: - platform: gpio pin: GPIO13 id: led inverted: True # status_led: # pin: # number: GPIO13 # inverted: yes switch: - platform: gpio name: Relay pin: GPIO12 id: relay on_turn_on: - output.turn_on: led on_turn_off: - output.turn_off: led