Homekit Lock linked to GPIO switch

Newbie here.
I am struggling to put together a configuration that

  1. registers a lock with Homekit, so I can tell Siri to “open Sesame!”
    and
  2. toggles a RPi GPIO pin that I want to use to actually drive that lock.

I found how to register a switch with Homekit so I can tell siri to “switch on Sesame!”.

homekit:
  filter:
    include_entities:
      - switch.sesame

switch:
  - platform: rpi_gpio
    ports:
      18: sesame

but when I want to “open” it, Siri tells me Sesame doesn’t have this function.

How can I make the switch look like a lock to Homekit?

Thx