Skip to content

Instantly share code, notes, and snippets.

@pauly7300
Created January 16, 2019 22:12
Show Gist options
  • Save pauly7300/cc57e43a943850f20e7095b1421655ba to your computer and use it in GitHub Desktop.
Save pauly7300/cc57e43a943850f20e7095b1421655ba to your computer and use it in GitHub Desktop.
esphomeyaml:
name: quin2
platform: ESP32
board: mhetesp32devkit
wifi:
ssid: '*********'
password: '**********'
mqtt:
broker: '192.168.x.x'
username: '*****'
password: '********'
# on_message:
# topic: quin2/switch/q2_onboard_light/cmnd
# payload: "ON"
# then:
# - switch.turn_on:
# id: Q2_Onboard
# Enable logging
logger:
# level: NONE
# optional web front end
web_server:
port: 80
ota:
password: '********'
dallas:
- pin: GPIO18
switch:
- platform: gpio
name: "Q2_Onboard light"
id: Q2_Onboard
inverted: OFF
pin: 2
output:
- platform: ledc
pin: 16
frequency: 40000Hz
bit_depth: 10
id: LED_gpio_16
###### Uncomment the number of ports you'll use so they're not all autodiscovered ######
# - platform: ledc
# pin: 17
# frequency: 40000Hz
# bit_depth: 10
# id: LED_gpio_17
# - platform: ledc
# pin: 5
# frequency: 40000Hz
# bit_depth: 10
# id: LED_gpio_5
# - platform: ledc
# pin: 19
# frequency: 40000Hz
# bit_depth: 10
# id: LED_gpio_19
light:
- platform: monochromatic
name: "Q2_LED light ouput1"
default_transition_length: 2s
id: light1
output: LED_gpio_16
###### Uncomment the number of ports you'll use so they're not all autodiscovered ######
# - platform: monochromatic
# name: "Q2_LED light ouput2"
# default_transition_length: 5s
# output: LED_gpio_17
# - platform: monochromatic
# name: "Q2_LED light ouput3"
# default_transition_length: 5s
# output: LED_gpio_5
# - platform: monochromatic
# name: "Q2_LED light ouput4"
# default_transition_length: 5s
# output: LED_gpio_19
#read 'Getting sensor ID's to learn how to get the address. https://esphomelib.com/esphomeyaml/components/sensor/dallas.html .
###
sensor:
- platform: dallas
address: ****************
name: "Q2_tempsensor"
# uncomment to try the capacitive touch sensor
# esp32_touch:
# setup_mode: False
## uncomment to connect a momentary button across pin 23 and ground in order to toggle the lights on/off
binary_sensor:
# - platform: gpio
# pin:
# number: 23
# mode: INPUT_PULLUP
# inverted: True
# name: button1
# on_click:
# min_length: 50ms
# max_length: 350ms
# then:
# - switch.toggle:
# id: Q2_Onboard
# - light.toggle:
# id: light1
## This is for a pir motion sensor I added to trigger the lights to come on via a Node-Red sketch
- platform: gpio
pin: 23
name: "Kitchen_Motion"
device_class: motion
## This is needed with the earlier section for touch sensor. This toggles both the onboard and the lights in the first slot.
# - platform: esp32_touch
# name: "ESP32 Touch GPIO32"
# pin: 32
# threshold: 500
# on_click:
# min_length: 50ms
# max_length: 350ms
# then:
# - switch.toggle:
# id: Q2_Onboard
# - light.toggle:
# id: light1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment