Created
September 7, 2023 12:32
-
-
Save letsautomatenet/80764a6f5362a60c11bf25b23cbe8f7d to your computer and use it in GitHub Desktop.
Water Sensor - Non-Contact - ESPHome
This file contains 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
esphome: | |
name: water-sensor-1 | |
friendly_name: Water Sensor 1 | |
esp8266: | |
board: d1_mini | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
encryption: | |
# If you go to this page it generates one for you automatically! | |
# https://esphome.io/components/api.html#configuration-variables | |
key: "Generate a key and put it here" | |
ota: | |
password: "randomsecurepassword" | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "Water-Sensor-1 Fallback Hotspot" | |
password: "differentrandomsecurepassword" | |
captive_portal: | |
binary_sensor: | |
- platform: gpio | |
pin: | |
number: D1 | |
mode: | |
input: true | |
pullup: true | |
name: Water Sensor 1 | |
device_class: moisture | |
filters: | |
- invert | |
- platform: gpio | |
pin: | |
number: D2 | |
mode: | |
input: true | |
pullup: true | |
name: Water Sensor 2 | |
device_class: moisture | |
filters: | |
- invert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment