i have an esp 32 with a voltage soil moisture sensor and it always reports the same voltage… here is my yaml.
esphome:
name: multi
friendly_name: multi
esp32:
board: esp32dev
framework:
type: arduino
version: latest
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxxxxxxxxxxxxx"
mdns:
disabled: false
ota:
- platform: esphome
password: "xxxxxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.188
gateway: 192.168.1.254
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Multi Fallback Hotspot"
password: "xxxxxxxxx"
captive_portal:
sensor:
- platform: dht
pin: GPIO4
model: DHT22
temperature:
name: "multisensor Temperature"
humidity:
name: "multisensor Humidity"
update_interval: 60s
- platform: wifi_signal
name: 'WiFi Signal'
entity_category: diagnostic
- platform: uptime
name: 'Uptime'
entity_category: diagnostic
unit_of_measurement: s
- platform: adc
pin: GPIO33
id: esp_wassernapf_volt
name: "soil Volt"
update_interval: 900s
accuracy_decimals: 5
unit_of_measurement: 'V'
- platform: template
name: "soil volume"
id: water1
unit_of_measurement: "gal"
filters:
- calibrate_linear:
# 0.1v = 0ml
# 1v = 1700ml
- 0.06 -> 0.0 # empty
- 0.1 -> 1.0 # half full or 10 mL of water
- 0.2 -> 2.0 # 20 ml -- full will be when the entire pad is covered
icon: "mdi:water-percent"
update_interval: 1s
accuracy_decimals: 1
lambda: |-
return id(esp_water_volt).state;
web_server:
port: 80
text_sensor:
- platform: version
name: 'ESPHome Version'
entity_category: diagnostic
- platform: wifi_info
ip_address:
name: WiFi IP Address
entity_category: diagnostic
ssid:
name: WiFi SSID
entity_category: diagnostic
mac_address:
name: WiFi MAC Address
entity_category: diagnostic
dns_address:
name: WiFi DNS Address
entity_category: diagnostic