Skip to content

Instantly share code, notes, and snippets.

@Snipercaine
Created July 27, 2019 17:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Snipercaine/e4726c5c4834e754c96f69200489c023 to your computer and use it in GitHub Desktop.
Save Snipercaine/e4726c5c4834e754c96f69200489c023 to your computer and use it in GitHub Desktop.
esphome:
name: main_bathroom
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi
password: !secret wifi_pw
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
switch:
- platform: gpio
name: "Main Bathroom Fan"
pin: GPIO5
id: relay_2
- platform: gpio
name: "Main Bathroom Light"
pin: GPIO4
id: relay_1
binary_sensor:
- platform: gpio
pin:
number: GPIO12
mode: INPUT_PULLUP
inverted: True
name: "Main Bathroom Light Button"
on_press:
- switch.toggle: relay_1
- platform: gpio
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: True
name: "Main Bathroom Fan Button"
on_press:
- switch.toggle: relay_2
- platform: gpio
pin: GPIO02 #D4
name: "Main Bathroom Motion"
device_class: motion
on_press:
then:
- switch.turn_on: relay_1
dallas:
- pin: GPIO16
id: main_bath_temp
sensor:
- platform: wifi_signal
name: "Main Bath WiFi Strength"
update_interval: 300s
- platform: uptime
name: Main Bath Uptime
- platform: dallas
address: 0x070218313278FF28
name: Main Bathroom Temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment