Skip to content

Instantly share code, notes, and snippets.

@batosai
Created May 8, 2024 17:28
Show Gist options
  • Save batosai/584fc79d1e2e346873f5d77508a3d027 to your computer and use it in GitHub Desktop.
Save batosai/584fc79d1e2e346873f5d77508a3d027 to your computer and use it in GitHub Desktop.
ESP WROOM - ESPHOME
esphome:
name: esp32-wroom
friendly_name: ESP32 WROOM
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ota:
password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-Wroom Fallback Hotspot"
password: "xxxxxxxxxx"
captive_portal:
binary_sensor:
- platform: gpio
pin:
number: 13
mode:
input: true
pullup: true
name: "Aziz lumière"
sensor:
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
name: "WiFi Signal dB"
id: wifi_signal_db
update_interval: 60s
entity_category: "diagnostic"
- platform: copy # Reports the WiFi signal strength in %
source_id: wifi_signal_db
name: "WiFi Signal Percent"
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "Signal %"
entity_category: "diagnostic"
device_class: ""
deep_sleep:
run_duration:
default: 10s
gpio_wakeup_reason: 10s
sleep_duration: 10min
wakeup_pin: 32
#wakeup_pin_mode: INVERT_WAKEUP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment