R503 - Use MCP23Sxx input as sensing pin

Hello all,

has anyone tried to use a MSP23Sxx pin as sensing pin for the R503 Fingerprint reader?
Is this possible? I do not get a working configuration.

Please don’t bother to post your (not working) configuration and logs as it might helps us to help you :see_no_evil:

For sure sorry.
Below the configuration I’ve tried. I’ve never loaded it to the board because esphome showed me the failure message:
Cannot resolve pin name 'mcp23s17_pin9' for board d1_mini.

Maybe I already found a way. I will check this soon.

esphome:
  name: "test-d1mini"

esp8266:
  board: d1_mini

logger:
  baud_rate: 0

api:

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "xxxxx"
    password: "xxxxx"

captive_portal:

uart:
  id: uart_r503
  rx_pin: GPIO5
  tx_pin: GPIO4
  baud_rate: 57600

spi:
  clk_pin: GPIO14
  mosi_pin: GPIO13
  miso_pin: GPIO12

mcp23s17:
  - id: 'mcp23s17_hub'
    cs_pin: GPIO16
    deviceaddress: 0

fingerprint_grow:
  sensing_pin: mcp23s17_pin9
  uart_id: uart_r503
  on_finger_scan_matched:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_matched
        data:
          finger_id: !lambda 'return finger_id;'
          confidence: !lambda 'return confidence;'
  on_finger_scan_unmatched:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_unmatched
  on_enrollment_scan:
    - homeassistant.event:
        event: esphome.test_node_enrollment_scan
        data:
          finger_id: !lambda 'return finger_id;'
          scan_num: !lambda 'return scan_num;'
  on_enrollment_done:
    - homeassistant.event:
        event: esphome.test_node_enrollment_done
        data:
          finger_id: !lambda 'return finger_id;'
  on_enrollment_failed:
    - homeassistant.event:
        event: esphome.test_node_enrollment_failed
        data:
          finger_id: !lambda 'return finger_id;'

binary_sensor:
  - platform: gpio
    name: "mcp23s17_pin9"
    id: mcp23s17_pin9
    pin:
      mcp23xxx: mcp23s17_hub
      number: 9
      mode:
        input: true

Solved with the following configuration:

  sensing_pin:
    mcp23xxx: mcp23s17_hub
    number: 1
    mode:
      input: true