Created
October 25, 2024 17:58
-
-
Save tkroo/70cc36f6b8513dc3f9b19bb3b793a107 to your computer and use it in GitHub Desktop.
esphome esp32s3 capacitive touch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| substitutions: | |
| name: esphome-web-a8d7b4 | |
| friendly_name: S3mini a8d7b4 | |
| esphome: | |
| name: ${name} | |
| friendly_name: ${friendly_name} | |
| min_version: 2024.6.0 | |
| name_add_mac_suffix: false | |
| platformio_options: | |
| board_build.flash_mode: dio | |
| project: | |
| name: esphome.web | |
| version: dev | |
| esp32: | |
| board: esp32-s3-devkitc-1 | |
| framework: | |
| type: arduino | |
| logger: | |
| api: | |
| ota: | |
| - platform: esphome | |
| wifi: | |
| ssid: !secret wifi_ssid | |
| password: !secret wifi_password | |
| mqtt: | |
| broker: homeassistant.local | |
| port: 1883 | |
| username: !secret mqtt_username | |
| password: !secret mqtt_key | |
| globals: | |
| - id: setup_mode_bool | |
| type: bool | |
| initial_value: 'false' | |
| switch: | |
| - platform: template | |
| restore_mode: RESTORE_DEFAULT_OFF | |
| name: "Setup mode on off" | |
| id: my_setup_mode | |
| turn_on_action: | |
| - logger.log: 'setup mode on' | |
| - globals.set: | |
| id: setup_mode_bool | |
| value: 'true' | |
| turn_off_action: | |
| - logger.log: 'setup mode off' | |
| - globals.set: | |
| id: setup_mode_bool | |
| value: 'false' | |
| lambda: |- | |
| return id(setup_mode_bool); | |
| esp32_touch: | |
| setup_mode: | |
| lambda: "return id(setup_mode_bool) == 'true';" | |
| measurement_duration: 0.25ms | |
| binary_sensor: | |
| - platform: esp32_touch | |
| id: esp32_touch_pad | |
| name: "touch" | |
| pin: GPIO14 | |
| threshold: 700000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment