I’m trying to switch on a water pump when soil moisture exceeds a set value. I then wate a set time and switch off. I keep getting a errof line 47 col 19 no matter what i do .
my code
/ accuracy_decimals 1
/ on_value_range:
/ - below: 0.4
Any help would ne appreciated. Also guidance on YAML
might clearup some of the mysteries
I would include all my code but cant find instructions for <?>
esphome:
name: 32-soil-moisture
friendly_name: 32 soil moisture
platform: ESP32
board: node32s
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xSPemlHe3fu4SxFAh8y9EPSF7uc/xSsj46xUhov9O04="
ota:
- platform: esphome
password: "c1b89da70746de31040566e3a5a0053c"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "32-Soil-Moisture"
password: "59pb65v8DhDS"
captive_portal:
switch:
- platform: gpio
pin: gpio22
name: "water_pump"
id: pel1_water1
sensor:
- platform:gpio
id: moisture_voltage
name:"Soil Moisture Voltage"
pin: gpio 36
accuracy_decimals 1
**on_value_range: **
** - below: 0.4**
then:
- switch.turn_on: pel1_water1
- delay: 2s
- switch.turn_off: pel1_water1
- above: 0.45
then:
- switch.turn_off: pel1_water1
filters:
- sliding_window_moving_average:
window_size: 60
send_every: 60