esphome:
  name: sonoff_rf_bridge01
esp8266:
  board: esp01_1m
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
logger:
api:
ota:
binary_sensor:
- platform: status
    name: "RF Bridge Status"
  - platform: remote_receiver
    name: "Sensor1"
    rc_switch_raw:
      code: '100110011100011010101001'
      protocol: 1
  - platform: remote_receiver
    name: "Sensor 2 Open"
    internal: yes
    rc_switch_raw:
      code: '001111111110111100101110'
      protocol: 1
    on_press:
      - binary_sensor.template.publish:
          id: Sensor2
          state: ON
  - platform: remote_receiver
    name: "Sensor 2 Closed"
    internal: yes
    rc_switch_raw:
      code: '001111111110111100100111'
      protocol: 1
    on_press:
      - binary_sensor.template.publish:
          id: Sensor2
          state: OFF
  - platform: template
    name: "Sensor2 State"
    device_class: window
    id: Sensor2
remote_receiver:
  pin: 4
  dump: rc_switch
  filter: 100us
  tolerance: 50%
  idle: 2ms
remote_transmitter:
  pin: 5
  carrier_duty_percent: 100%
status_led:
  pin:
    number: GPIO13
    inverted: yes