esphome: name: ${device_name} friendly_name: ${friendly_name} comment: "Sonoff MiniR4 Extreme" esp32: board: esp32dev framework: type: esp-idf # Enable logging logger: # Enable Home Assistant API api: encryption: key: "SHWdMNPDac9CCz0UTRCwvPrc20nzCa/xjDanSw8LVWc=" # Over-the-air Update ota: - platform: esphome id: myota password: ${ota_password} wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "${device_name}" password: ${fallback_wifi_pwd} captive_portal: web_server: port: 80 sensor: - platform: wifi_signal name: ${friendly_name} Wifi Signal Strength update_interval: 90s entity_category: "diagnostic" - platform: uptime name: ${friendly_name} Uptime update_interval: 300s entity_category: "diagnostic" text_sensor: - platform: wifi_info ssid: name: Connected SSID ip_address: name: IP Address dns_address: name: DNS Address status_led: pin: number: GPIO19 inverted: true ####################################### # Device specific Config Begins Below # ####################################### switch: - platform: restart name: ${friendly_name} Restart output: # Physical relay on GPIO - platform: gpio pin: GPIO26 id: relay_1 light: - platform: binary id: light_1 name: ${friendly_name} icon: mdi:ceiling-light-multiple-outline restore_mode: restore_default_off output: relay_1 binary_sensor: - platform: gpio pin: GPIO00 id: button filters: - invert: - delayed_off: 50ms on_press: - light.toggle: id: light_1 - platform: gpio name: s1 pin: GPIO27 id: s1 filters: - invert: - delayed_off: 50ms on_press: - light.toggle: id: light_1 bluetooth_proxy: active: ${bt_proxy}