08-23-2023, 01:07 PM
Hi,
Using ESPHOME in Home Assistant.
I have 2 of these float sensor switches. How should I be wiring them up to the board and coding in ESPHome to get an "open/closed"? I thought that they would be an analog device but am not getting any readings.
Or am I using the wrong input?
Thanks
Using ESPHOME in Home Assistant.
I have 2 of these float sensor switches. How should I be wiring them up to the board and coding in ESPHome to get an "open/closed"? I thought that they would be an analog device but am not getting any readings.
Or am I using the wrong input?
Code:
##################### Analog Inputs
# 2 x DC 0-5V (AI1, AI2)
# 2 x 4-20mA (AI3, AI4)
# GPIO36 ANALOG_A1
# GPIO39 ANALOG_A2
# GPIO34 ANALOG_A3
# GPIO35 ANALOG_A4
# DC 0-5v - ANALOG_A1
- platform: gpio
name: "ANALOG_A1"
id: ANALOG_A1
pin:
number: GPIO36
# inverted: true
# DC 0-5v - ANALOG_A2
- platform: gpio
name: "ANALOG_A2"
id: ANALOG_A2
pin:
number: GPIO39
# inverted: true
# 4-20mA ANALOG_A3
- platform: gpio
name: "ANALOG_A3"
id: ANALOG_A3
pin:
number: GPIO34
# inverted: true
# 4-20mA ANALOG_A4
- platform: gpio
name: "ANALOG_A4"
id: ANALOG_A4
pin:
number: GPIO35
# inverted: true
Thanks