11-16-2022, 02:41 PM
(11-16-2022, 12:48 PM)admin Wrote: digital input 1-8 can use for dry contact sensor. but whether ESPHome can calculate the pulse number, i have not tested. if ESPHome support and make sure what your water sensor pulse frequency, whether esp32 gpio speed fast enough.
For digital input it's simple, it's a binary_sensor and the platform is - platform: gpio and pin is 0,1, 2....
But for - platform: pulse_counter what is the way to configure the PIN ? 0,1,2 doesn't oK
Who can have a configuration for pulse_counter on K868-A8 on Home assistant ?
Thanks
Binary sensor -> simple
pcf8574:
- id: 'pcf8574_hub_output'
address: 0x24
- id: 'pcf8574_hub_input'
address: 0x22
binary_sensor:
- platform: gpio
name: "input1"
pin:
pcf8574: pcf8574_hub_input
# Use pin number 0
number: 0
# One of INPUT or OUTPUT
mode: INPUT
inverted: false
- platform: gpio
name: "input2"
pin:
pcf8574: pcf8574_hub_input
# Use pin number 0
number: 1
# One of INPUT or OUTPUT
mode: INPUT
inverted: false
But for pulse_counter, for input 0,1,2,3.... ?
sensor:
- platform: pulse_counter
update_interval: 2s
pin:
number: 21
inverted: true
mode:
input: true
pullup: true
name: "Pulse Counter"