Hi
I am trying to use the GPIO3 pin on a Sonoff Basic to capture the readings from a DFRobot SEN0308 Moisture sensor but need some help with the YAML file configuration on ESPHome integration in Home Assistant.
I have the Sonoff working fine as a simple relay switch in ESPHome integration already so I know the device is working fine.
The next step is to connect the moisture sensor to the spare breakout pins on the Sonoff with:
vcc → vcc
gnd - > gnd
data → TX (which is on Pin GPIO3)
I need to know what to add to my YAML file to get the readings from GPIO3. Here is what I have tried:
# Get output from soil moisture sensor on pin 3
output:
- platform: gpio
id: "Irrigation_Sonoff"
pin:
number: GPIO3
If I understand correctly this will collect the moisture readings on GPIO3.
Then I try to set up the sensor with:
sensor:
- platform: gpio
output: "Moisture_Sensor"
pin: GPIO3
name: "mosture"
But this is giving a “x” when I try to put into my YAML file.
Any suggestions?
Regards
Gavin