39 lines
1.4 KiB
YAML
Executable File
39 lines
1.4 KiB
YAML
Executable File
---
|
|
sensor:
|
|
# Soil humidity %
|
|
- platform: adc
|
|
pin: ${pin_soil}
|
|
name: '${device_name} Soil Moisture'
|
|
id: ${device_name}_moisture
|
|
icon: 'mdi:watering-can'
|
|
update_interval: ${update_interval}
|
|
attenuation: 11db
|
|
accuracy_decimals: 2 # comment for calibration
|
|
unit_of_measurement: '%' # comment for calibration
|
|
device_class: 'moisture'
|
|
state_class: 'measurement'
|
|
# unit_of_measurement: "V" # uncomment for calibration
|
|
filters: # comment when calibrating
|
|
- calibrate_linear: # comment when calibrating
|
|
# Map 0.0 (from sensor) to 0.0 (true value)
|
|
- ${moisture_min} -> 0.0 # comment when calibrating
|
|
- ${moisture_max} -> 100.0 # comment when calibrating
|
|
|
|
# Fertilizer sensor
|
|
- platform: adc
|
|
pin: ${pin_fertilizer}
|
|
name: '${device_name} Soil Conductivity'
|
|
icon: 'mdi:flower'
|
|
update_interval: ${update_interval}
|
|
accuracy_decimals: 2 # comment for calibration
|
|
unit_of_measurement: 'µS/cm' # comment when calibrating
|
|
# device_class: '' # for now home assistant does not support this class
|
|
state_class: 'measurement'
|
|
# unit_of_measurement: "V" # uncomment for raw data
|
|
filters: # comment when calibrating
|
|
- calibrate_linear: # comment when calibrating
|
|
# Map 0.0 (from sensor) to 0.0 (true value)
|
|
- ${conductivity_min} -> 0.0 # comment when calibrating
|
|
- ${conductivity_max} -> 100.0 # comment when calibrating
|
|
|