Skip to content

Instantly share code, notes, and snippets.

@jcallaghan
Created March 12, 2020 23:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcallaghan/982e542bdff1869f19d6de11daff2ee5 to your computer and use it in GitHub Desktop.
Save jcallaghan/982e542bdff1869f19d6de11daff2ee5 to your computer and use it in GitHub Desktop.
This is the ESPHome configuration I use for my IoT air fresheners.
substitutions:
system_name: esph_dining_room_air_freshener
friendly_name: Esph Dining Room Air Freshener
esphome:
name: ${system_name}
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "your_network_ssid"
password: "your_network_key"
ap:
ssid: ${friendly_name}
password: "MlNQAm0J3n4U"
captive_portal:
logger:
api:
ota:
text_sensor:
- platform: version
name: "${system_name}_version"
sensor:
- platform: wifi_signal
name: "${system_name}_wifi_signal"
update_interval: 30s
- platform: uptime
name: "${system_name}_uptime"
update_interval: 60s
switch:
- platform: gpio
pin: GPIO4
id: relay
- platform: template
name: "${system_name}_air_freshener"
icon: "mdi:air-horn"
turn_on_action:
- switch.turn_on: relay
- delay: 0.5s
- switch.turn_off: relay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment