Skip to content

Instantly share code, notes, and snippets.

@pauly7300
Created April 16, 2019 21:26
Show Gist options
  • Save pauly7300/1c1877e3b790f2d65fa2b56126a4d258 to your computer and use it in GitHub Desktop.
Save pauly7300/1c1877e3b790f2d65fa2b56126a4d258 to your computer and use it in GitHub Desktop.
esp32_touch light example
esphome:
name: aaa
platform: ESP32
board: mhetesp32devkit
wifi:
ssid: "wifi_ssid"
password: "wifipassword"
# Enable logging
logger:
# Enable Home Assistant API
api:
password: 'apipassword'
ota:
password: 'apipassword'
# Example configuration entry
esp32_touch:
setup_mode: False
# Example configuration entry
output:
- platform: ledc
pin: GPIO19
id: gpio_19
# Example usage in a light
light:
- platform: monochromatic
output: gpio_19
id: kitchen_light
name: "Kitchen Light"
binary_sensor:
- platform: esp32_touch
name: "ESP32 Touch GPIO32"
pin: 32
threshold: 500
on_click:
min_length: 50ms
max_length: 350ms
then:
- light.toggle:
id: kitchen_light
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment