My garden ESPHome configuration
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: garden | |
platform: ESP32 | |
board: esp-wrover-kit | |
wifi: | |
ssid: "greenhouse" | |
password: "senhasupersecreta" | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "Garden Fallback Hotspot" | |
password: "YE5MzyC3pCZv" | |
esp32_ble_tracker: | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: "cb6wist3" | |
ota: | |
password: "cb6wist3" | |
web_server: | |
port: 80 | |
# sensor: | |
# - platform: xiaomi_hhccjcy01 | |
# mac_address: 'C4:7C:8D:62:D4:BF' | |
# temperature: | |
# name: "Xiaomi MiFlora Temperature" | |
# moisture: | |
# name: "Xiaomi MiFlora Moisture" | |
# illuminance: | |
# name: "Xiaomi MiFlora Illuminance" | |
# conductivity: | |
# name: "Xiaomi MiFlora Soil Conductivity" | |
# battery_level: | |
# name: "Xiaomi MiFlora Battery Level" | |
# # ADC for the soil moisture sensor | |
# - platform: adc | |
# pin: GPIO35 | |
# filters: | |
# - lambda: |- | |
# if (x > 3.74) { | |
# return 0; | |
# } else if (x < 1.53) { | |
# return 100; | |
# } else { | |
# return (3.74-x) / (3.74-1.53) * 100.0; | |
# } | |
# name: "Soil Moisture Level" | |
# update_interval: 2s | |
# attenuation: 11db | |
# unit_of_measurement: "%" | |
# # pulse for the water flow sensor | |
# - platform: pulse_counter | |
# pin: GPIO34 | |
# unit_of_measurement: 'l' | |
# name: 'Water Flow Meter' | |
# filters: | |
# - multiply: 0.00353 | |
# update_interval: 10s | |
switch: | |
- platform: template | |
name: "Irrigate 15 minutes" | |
id: irrigate_15 | |
turn_on_action: | |
- switch.turn_on: right_sprinklers | |
- delay: 15 min | |
- switch.turn_off: right_sprinklers | |
- switch.turn_on: left_sprinklers | |
- delay: 15 min | |
- switch.turn_off: irrigate_15 | |
turn_off_action: | |
- switch.turn_off: right_sprinklers | |
- switch.turn_off: left_sprinklers | |
- switch.turn_off: hose | |
- platform: template | |
name: "Irrigate 30 minutes" | |
id: irrigate_30 | |
turn_on_action: | |
- switch.turn_on: right_sprinklers | |
- delay: 30 min | |
- switch.turn_off: right_sprinklers | |
- switch.turn_on: left_sprinklers | |
- delay: 30 min | |
- switch.turn_off: irrigate_30 | |
turn_off_action: | |
- switch.turn_off: right_sprinklers | |
- switch.turn_off: left_sprinklers | |
- switch.turn_off: hose | |
- platform: gpio | |
pin: | |
number: 19 | |
inverted: yes | |
name: "Relay 1" | |
icon: "mdi:gate" | |
- platform: gpio | |
pin: | |
number: 18 | |
inverted: yes | |
name: "Relay 2" | |
icon: "mdi:gate" | |
- platform: gpio | |
pin: | |
number: 5 | |
inverted: yes | |
name: "Relay 3" | |
icon: "mdi:gate" | |
- platform: gpio | |
pin: | |
number: 17 | |
inverted: yes | |
name: "Relay 4" | |
icon: "mdi:gate" | |
- platform: gpio | |
pin: | |
number: 16 | |
inverted: yes | |
name: "Relay 5" | |
icon: "mdi:gate" | |
- platform: gpio | |
id: hose | |
pin: | |
number: 4 | |
inverted: yes | |
name: "Relay 6" | |
icon: "mdi:gate" | |
- platform: gpio | |
id: left_sprinklers | |
pin: | |
number: 0 | |
inverted: yes | |
name: "Relay 7" | |
icon: "mdi:gate" | |
- platform: gpio | |
id: right_sprinklers | |
pin: | |
number: 15 | |
inverted: yes | |
name: "Relay 8" | |
icon: "mdi:gate" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment